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

2024-04-23 Thread Huang, Kai
On Tue, 2024-04-23 at 19:26 -0500, Haitao Huang wrote: > On Tue, 23 Apr 2024 17:13:15 -0500, Huang, Kai wrote: > > > On Tue, 2024-04-23 at 10:30 -0500, Haitao Huang wrote: > > > > > It's a workaround because you use the capacity==0 but it does not > > > really > > > > > mean to disable the misc

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

2024-04-23 Thread Haitao Huang
On Tue, 23 Apr 2024 17:13:15 -0500, Huang, Kai wrote: On Tue, 2024-04-23 at 10:30 -0500, Haitao Huang wrote: > > It's a workaround because you use the capacity==0 but it does not really > > mean to disable the misc cgroup for specific resource IIUC. > > Please read the comment around @misc_r

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

2024-04-23 Thread Huang, Kai
On Tue, 2024-04-23 at 10:30 -0500, Haitao Huang wrote: > > > It's a workaround because you use the capacity==0 but it does not really > > > mean to disable the misc cgroup for specific resource IIUC. > > > > Please read the comment around @misc_res_capacity again: > > > >   * Miscellaneous resour

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

2024-04-23 Thread Haitao Huang
On Tue, 23 Apr 2024 09:19:53 -0500, Huang, Kai wrote: On Tue, 2024-04-23 at 08:08 -0500, Haitao Huang wrote: On Mon, 22 Apr 2024 17:16:34 -0500, Huang, Kai wrote: > On Mon, 2024-04-22 at 11:17 -0500, Haitao Huang wrote: > > On Sun, 21 Apr 2024 19:22:27 -0500, Huang, Kai > > wrote: > > > >

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

2024-04-23 Thread Huang, Kai
On Tue, 2024-04-23 at 08:08 -0500, Haitao Huang wrote: > On Mon, 22 Apr 2024 17:16:34 -0500, Huang, Kai wrote: > > > On Mon, 2024-04-22 at 11:17 -0500, Haitao Huang wrote: > > > On Sun, 21 Apr 2024 19:22:27 -0500, Huang, Kai > > > wrote: > > > > > > > On Fri, 2024-04-19 at 20:14 -0500, Haitao

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

2024-04-23 Thread Haitao Huang
On Mon, 22 Apr 2024 17:16:34 -0500, Huang, Kai wrote: On Mon, 2024-04-22 at 11:17 -0500, Haitao Huang wrote: On Sun, 21 Apr 2024 19:22:27 -0500, Huang, Kai wrote: > On Fri, 2024-04-19 at 20:14 -0500, Haitao Huang wrote: > > > > I think we can add support for "sgx_cgroup=disabled" in future

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

2024-04-22 Thread Huang, Kai
On Mon, 2024-04-22 at 11:17 -0500, Haitao Huang wrote: > On Sun, 21 Apr 2024 19:22:27 -0500, Huang, Kai wrote: > > > On Fri, 2024-04-19 at 20:14 -0500, Haitao Huang wrote: > > > > > I think we can add support for "sgx_cgroup=disabled" in future if > > > indeed > > > > > needed. But just for ini

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

2024-04-22 Thread Haitao Huang
On Sun, 21 Apr 2024 19:22:27 -0500, Huang, Kai wrote: On Fri, 2024-04-19 at 20:14 -0500, Haitao Huang wrote: > > I think we can add support for "sgx_cgroup=disabled" in future if indeed > > needed. But just for init failure, no? > > > > It's not about the commandline, which we can add in the

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

2024-04-21 Thread Huang, Kai
On Fri, 2024-04-19 at 20:14 -0500, Haitao Huang wrote: > > > I think we can add support for "sgx_cgroup=disabled" in future if indeed > > > needed. But just for init failure, no? > > > > > > > It's not about the commandline, which we can add in the future when > > needed.  It's about we need to h

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

2024-04-19 Thread Haitao Huang
On Fri, 19 Apr 2024 17:44:59 -0500, Huang, Kai wrote: On Fri, 2024-04-19 at 13:55 -0500, Haitao Huang wrote: On Thu, 18 Apr 2024 20:32:14 -0500, Huang, Kai wrote: > > > On 16/04/2024 3:20 pm, Haitao Huang wrote: > > From: Kristen Carlson Accardi > > In cases EPC pages need be allocated d

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

2024-04-19 Thread Huang, Kai
On Fri, 2024-04-19 at 13:55 -0500, Haitao Huang wrote: > On Thu, 18 Apr 2024 20:32:14 -0500, Huang, Kai wrote: > > > > > > > On 16/04/2024 3:20 pm, Haitao Huang wrote: > > > From: Kristen Carlson Accardi > > > In cases EPC pages need be allocated during a page fault and the cgroup > > > usage

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

2024-04-19 Thread Haitao Huang
On Thu, 18 Apr 2024 20:32:14 -0500, Huang, Kai wrote: On 16/04/2024 3:20 pm, 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 be triggered to avoid blocking t

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

2024-04-18 Thread Huang, Kai
On 16/04/2024 3:20 pm, 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 be triggered to avoid blocking the page fault handling. Create a workqueue, correspondi

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

2024-04-15 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 cg