Re: [PATCH v5 11/18] x86/sgx: store unreclaimable pages in LRU lists

2023-10-03 Thread Huang, Kai
On Tue, 2023-10-03 at 00:15 -0500, Haitao Huang wrote: > On Thu, 28 Sep 2023 04:41:33 -0500, Huang, Kai wrote: > > > > > > --- a/arch/x86/kernel/cpu/sgx/encl.c > > > +++ b/arch/x86/kernel/cpu/sgx/encl.c > > > @@ -746,6 +746,7 @@ void sgx_encl_release(struct kref *ref) > > >

Re: [PATCH v5 11/18] x86/sgx: store unreclaimable pages in LRU lists

2023-10-02 Thread Haitao Huang
On Wed, 27 Sep 2023 06:57:18 -0500, Huang, Kai wrote: On Fri, 2023-09-22 at 20:06 -0700, Haitao Huang wrote: From: Sean Christopherson When an OOM event occurs, all pages associated with an enclave will need to be freed, including pages that are not currently tracked by the cgroup LRU

Re: [PATCH v5 11/18] x86/sgx: store unreclaimable pages in LRU lists

2023-10-02 Thread Haitao Huang
On Thu, 28 Sep 2023 04:41:33 -0500, Huang, Kai wrote: --- a/arch/x86/kernel/cpu/sgx/encl.c +++ b/arch/x86/kernel/cpu/sgx/encl.c @@ -746,6 +746,7 @@ void sgx_encl_release(struct kref *ref) xa_destroy(>page_array); if (!encl->secs_child_cnt && encl->secs.epc_page) { +

Re: [PATCH v5 11/18] x86/sgx: store unreclaimable pages in LRU lists

2023-09-28 Thread Huang, Kai
> --- a/arch/x86/kernel/cpu/sgx/encl.c > +++ b/arch/x86/kernel/cpu/sgx/encl.c > @@ -746,6 +746,7 @@ void sgx_encl_release(struct kref *ref) > xa_destroy(>page_array); > > if (!encl->secs_child_cnt && encl->secs.epc_page) { > + sgx_drop_epc_page(encl->secs.epc_page); >

Re: [PATCH v5 11/18] x86/sgx: store unreclaimable pages in LRU lists

2023-09-27 Thread Huang, Kai
On Fri, 2023-09-22 at 20:06 -0700, Haitao Huang wrote: > From: Sean Christopherson > > When an OOM event occurs, all pages associated with an enclave will need > to be freed, including pages that are not currently tracked by the > cgroup LRU lists. What are "cgroup LRU lists"? > > Add a new

[PATCH v5 11/18] x86/sgx: store unreclaimable pages in LRU lists

2023-09-22 Thread Haitao Huang
From: Sean Christopherson When an OOM event occurs, all pages associated with an enclave will need to be freed, including pages that are not currently tracked by the cgroup LRU lists. Add a new "unreclaimable" list to the sgx_epc_lru_lists struct and update the "sgx_record/drop_epc_pages()"