lkml.org 
[lkml]   [2023]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 08/18] x86/sgx: Use a list to track to-be-reclaimed pages
Date
From
On Thu, 28 Sep 2023 04:28:34 -0500, Huang, Kai <kai.huang@intel.com> wrote:

> On Fri, 2023-09-22 at 20:06 -0700, Haitao Huang wrote:
>> @@ -314,18 +313,22 @@ static void sgx_reclaim_pages(void)
>> if (kref_get_unless_zero(&encl_page->encl->refcount) != 0) {
>> sgx_epc_page_set_state(epc_page, SGX_EPC_PAGE_RECLAIM_IN_PROGRESS);
>> - chunk[cnt++] = epc_page;
>> + list_move_tail(&epc_page->list, &iso);
>> } else {
>> - /* The owner is freeing the page. No need to add the
>> - * page back to the list of reclaimable pages.
>> + /* The owner is freeing the page, remove it from the
>> + * LRU list
>> */
>
> Please fix comment style.

Sure

>
>> sgx_epc_page_reset_state(epc_page);
>> + list_del_init(&epc_page->list);
>
> Is this still needed? It seems list_del_init() has been done when the
> EPC page
> is taken off from the global active list?
>

Good catch. I'll remove it.

Thanks
Haitao

\
 
 \ /
  Last update: 2023-10-03 07:10    [W:0.113 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site