Re: [PATCH v10 09/14] x86/sgx: Implement async reclamation for cgroup

2024-04-04 Thread Haitao Huang
On Thu, 04 Apr 2024 06:16:54 -0500, Huang, Kai wrote: On Wed, 2024-03-27 at 17:22 -0700, Haitao Huang wrote: void sgx_cgroup_init(void) { + sgx_cg_wq = alloc_workqueue("sgx_cg_wq", WQ_UNBOUND | WQ_FREEZABLE, WQ_UNBOUND_MAX_ACTIVE); + + /* All Cgroups functionalities are disabled.

Re: [PATCH v10 09/14] x86/sgx: Implement async reclamation for cgroup

2024-04-04 Thread Huang, Kai
On Wed, 2024-03-27 at 17:22 -0700, Haitao Huang wrote: >   >  void sgx_cgroup_init(void) >  { > + sgx_cg_wq = alloc_workqueue("sgx_cg_wq", WQ_UNBOUND | WQ_FREEZABLE, > WQ_UNBOUND_MAX_ACTIVE); > + > + /* All Cgroups functionalities are disabled. */ > + if (WARN_ON(!sgx_cg_wq)) > +

[PATCH v10 09/14] x86/sgx: Implement async reclamation for cgroup

2024-03-27 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 be triggered to avoid blocking the page fault handling. Create a workqueue, corresponding work item and function definitions for EPC