]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: export list of cgroups v2 features using sysfs
authorRoman Gushchin <guro@fb.com>
Mon, 6 Nov 2017 18:30:29 +0000 (13:30 -0500)
committerTejun Heo <tj@kernel.org>
Mon, 6 Nov 2017 20:01:57 +0000 (12:01 -0800)
commite50fa71aa3e6a1b9fe043ae76177d996772bb15b
tree485162ac6fa8ae522c8ccfde830d7d40a2d8b069
parent6a4ebf10a38944741efc185e8c70e4fb8f6053c1
cgroup: export list of cgroups v2 features using sysfs

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: Roman Gushchin <guro@fb.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: kernel-team@fb.com
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup.c