Re: [PATCH v5 07/18] x86/sgx: Introduce RECLAIM_IN_PROGRESS state

2023-09-27 Thread Huang, Kai
> @@ -312,13 +312,15 @@ static void sgx_reclaim_pages(void) > list_del_init(_page->list); > encl_page = epc_page->owner; > > - if (kref_get_unless_zero(_page->encl->refcount) != 0) > + if (kref_get_unless_zero(_page->encl->refcount) != 0) { >

Re: [PATCH v5 07/18] x86/sgx: Introduce RECLAIM_IN_PROGRESS state

2023-09-25 Thread Jarkko Sakkinen
On Sat Sep 23, 2023 at 6:06 AM EEST, Haitao Huang wrote: > From: Sean Christopherson > > Add RECLAIM_IN_PROGRESS state to not rely on list_empty(_page->list) > to determine if an EPC page is selected as a reclaiming candidate. > > When a page is being reclaimed from the page pool

[PATCH v5 07/18] x86/sgx: Introduce RECLAIM_IN_PROGRESS state

2023-09-22 Thread Haitao Huang
From: Sean Christopherson Add RECLAIM_IN_PROGRESS state to not rely on list_empty(_page->list) to determine if an EPC page is selected as a reclaiming candidate. When a page is being reclaimed from the page pool (sgx_global_lru), there is an intermediate stage where a page may have been