cgroups.7: Document cgroups v2 unified hierarchy

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-10-07 19:56:38 +02:00
parent 2befa495c2
commit dddb7ea1fc
1 changed files with 26 additions and 3 deletions

View File

@ -453,15 +453,18 @@ under both the v1 and the v2 hierarchies.
The new behaviors in cgroups v2 are summarized here,
and in some cases elaborated in the following subsections.
.IP 1. 3
Cgroups v2 provides a unified hiearchy against
which all controllers are mounted.
.IP 2.
"Internal" processes are not permitted.
With the exception of the root cgroup, processes may reside
only in leaf nodes (cgroups that do not themselves contain child cgroups).
.IP 2.
.IP 3.
Active cgroups must be specified via the files
.IR cgroup.controllers
and
.IR cgroup.subtree_control .
.IP 3.
.IP 4.
The
.I tasks
file has been removed.
@ -470,7 +473,7 @@ In addition, the
file that is employed by the
.I cpuset
controller has been removed.
.IP 4.
.IP 5.
An improved mechanism for notification of empty cgroups is provided by the
.IR cgroup.events
file.
@ -479,6 +482,25 @@ For more changes, see the
.I Documentation/cgroup-v2.txt
file in the kernel source.
.\"
.SS Cgroups v2 unified hierarchy
In cgroups v1, the ability to mount different controllers
against different hierarchies was intended to allow great flexibility
for application design.
In practice, though, the flexibility turned out to less useful than expected,
and in many cases added complexity.
Therefore, in cgroups v2,
all available controllers are mounted against a single hierarchy.
The available controllers are automatically mounted,
meaning that it is not necessary (or possible) to specify the controllers
when mounting the cgroup v2 filesystem using a command such as the following:
mount -t cgroup2 none /mnt/cgroup2
A cgroup v2 controller is available only if it is not currently in use
via a mount against a cgroup v1 hierarchy.
Or, to put things another way, it is not possible to employ
the same controller against both a v1 hierarchy and the unified v2 hierarchy.
.\"
.SS Cgroups v2 "no internal processes" rule
With the exception of the root cgroup, processes may reside
only in leaf nodes (cgroups that do not themselves contain child cgroups).
@ -528,6 +550,7 @@ then it cannot be enabled in
.IR /A/B/C .
.\"
.SS Cgroups v2 events file
.\" FIXME The following text is wrong
A new feature in cgroups v2 is the
.I cgroup.populated
file.