• R
    cgroup: export list of cgroups v2 features using sysfs · 5f2e6734
    Roman Gushchin 提交于
    The active development of cgroups v2 sometimes leads to a creation
    of interfaces, which are not turned on by default (to provide
    backward compatibility). It's handy to know from userspace, which
    cgroup v2 features are supported without calculating it based
    on the kernel version. So, let's export the list of such features
    using /sys/kernel/cgroup/features pseudo-file.
    
    The list is hardcoded and has to be extended when new functionality
    is added. Each feature is printed on a new line.
    
    Example:
      $ cat /sys/kernel/cgroup/features
      nsdelegate
    Signed-off-by: NRoman Gushchin <guro@fb.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: kernel-team@fb.com
    Signed-off-by: NTejun Heo <tj@kernel.org>
    5f2e6734
cgroup.c 155.0 KB