lkml.org 
[lkml]   [2024]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v10 12/14] x86/sgx: Turn on per-cgroup EPC reclamation
Date
From
On Mon, 08 Apr 2024 17:37:10 -0500, Huang, Kai <kai.huang@intel.com> wrote:

>
>
> On 9/04/2024 6:03 am, Haitao Huang wrote:
>>>>
>> The misc root cgroup is a static similar to sgx_cg_root. So
>> misc_cg_root() won't be NULL
>> However, based on how css_misc() was check NULL, I suppose
>> sgx_get_current_cg() may be NULL when cgroup is disabled (again not
>> 100% sure but we handle it anyway)
>
> Could you help to check? Sorry I am busy on something else thus won't
> be able to do any actual check.
>
It's always non-NULL based on testing.

It's hard for me to say definitely by reading the code. But IIUC
cgroup_disable command-line only blocks operations in /sys/fs/cgroup so
user space can't set up controllers and config limits, etc., for the
diasabled ones. Each task->cgroups would still have a non-NULL pointer to
the static root object for each cgroup that is enabled by KConfig, so
get_current_misc_cg() thus sgx_get_current_cg() should not return NULL
regardless 'cgroup_disable=misc'.

Maybe @Michal or @tj can confirm?

Thanks
Haitao


\
 
 \ /
  Last update: 2024-05-27 16:30    [W:0.063 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site