OSDN Git Service

cpuset: Expose cpus.effective and mems.effective on cgroup v2 root
authorWaiman Long <longman@redhat.com>
Thu, 8 Nov 2018 15:08:43 +0000 (10:08 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 8 Nov 2018 20:27:31 +0000 (12:27 -0800)
Because of the fact that setting the "cpuset.sched.partition" in
a direct child of root can remove CPUs from the root's effective CPU
list, it makes sense to know what CPUs are left in the root cgroup for
scheduling purpose. So the "cpuset.cpus.effective" control file is now
exposed in the v2 cgroup root.

For consistency, the "cpuset.mems.effective" control file is exposed
as well.

Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Documentation/admin-guide/cgroup-v2.rst
kernel/cgroup/cpuset.c

index 01b70f6..595b075 100644 (file)
@@ -1653,7 +1653,7 @@ Cpuset Interface Files
        and won't be affected by any CPU hotplug events.
 
   cpuset.cpus.effective
-       A read-only multiple values file which exists on non-root
+       A read-only multiple values file which exists on all
        cpuset-enabled cgroups.
 
        It lists the onlined CPUs that are actually granted to this
@@ -1693,7 +1693,7 @@ Cpuset Interface Files
        and won't be affected by any memory nodes hotplug events.
 
   cpuset.mems.effective
-       A read-only multiple values file which exists on non-root
+       A read-only multiple values file which exists on all
        cpuset-enabled cgroups.
 
        It lists the onlined memory nodes that are actually granted to
index 3960de7..fc1a809 100644 (file)
@@ -2574,14 +2574,12 @@ static struct cftype dfl_files[] = {
                .name = "cpus.effective",
                .seq_show = cpuset_common_seq_show,
                .private = FILE_EFFECTIVE_CPULIST,
-               .flags = CFTYPE_NOT_ON_ROOT,
        },
 
        {
                .name = "mems.effective",
                .seq_show = cpuset_common_seq_show,
                .private = FILE_EFFECTIVE_MEMLIST,
-               .flags = CFTYPE_NOT_ON_ROOT,
        },
 
        {