Re: [PATCH v16 10/16] x86/sgx: Implement async reclamation for cgroup

2024-08-27 Thread Huang, Kai
On 27/08/2024 10:22 pm, Huang, Kai wrote: On Tue, 2024-08-20 at 18:53 -0700, Haitao Huang wrote: +/** + * Only called during init to unwind what's done in sgx_cgroup_init() + */ +void __init sgx_cgroup_deinit(void) +{ + destroy_workqueue(sgx_cg_wq); +} + Ditto: arch/x86/kernel/cpu/sg

Re: [PATCH v16 10/16] x86/sgx: Implement async reclamation for cgroup

2024-08-27 Thread Jarkko Sakkinen
On Wed Aug 21, 2024 at 4:53 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > In cases EPC pages need be allocated during a page fault and the cgroup > usage is near its limit, an asynchronous reclamation needs to be > triggered to avoid blocking the page fault handling. > > To keep

Re: [PATCH v16 10/16] x86/sgx: Implement async reclamation for cgroup

2024-08-27 Thread Huang, Kai
On Tue, 2024-08-20 at 18:53 -0700, Haitao Huang wrote: > +/** > + * Only called during init to unwind what's done in sgx_cgroup_init() > + */ > +void __init sgx_cgroup_deinit(void) > +{ > + destroy_workqueue(sgx_cg_wq); > +} > + Ditto: arch/x86/kernel/cpu/sgx/epc_cgroup.c:412: warning: This c

[PATCH v16 10/16] x86/sgx: Implement async reclamation for cgroup

2024-08-20 Thread Haitao Huang
From: Kristen Carlson Accardi In cases EPC pages need be allocated during a page fault and the cgroup usage is near its limit, an asynchronous reclamation needs to be triggered to avoid blocking the page fault handling. To keep implementation simple, use a workqueue instead of kthread to schedul