cgroups.7: Restructure list of cgroup v2 differences

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-10-07 17:02:32 +02:00
parent 5b38b21d2d
commit 2befa495c2
1 changed files with 34 additions and 24 deletions

View File

@ -450,10 +450,38 @@ mounted under the v1 and v2 hierarchies,
it is not possible to mount the same controller simultaneously
under both the v1 and the v2 hierarchies.
The new behaviors in cgroups v2 are summarized below:
.TP 3
1. Processes only in leaf nodes
With the exception of the root cgroup, processes may reside only in leaf nodes.
The new behaviors in cgroups v2 are summarized here,
and in some cases elaborated in the following subsections.
.IP 1. 3
"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.
Active cgroups must be specified via the files
.IR cgroup.controllers
and
.IR cgroup.subtree_control .
.IP 3.
The
.I tasks
file has been removed.
In addition, the
.I cgroup.clone_children
file that is employed by the
.I cpuset
controller has been removed.
.IP 4.
An improved mechanism for notification of empty cgroups is provided by the
.IR cgroup.events
file.
.PP
For more changes, see the
.I Documentation/cgroup-v2.txt
file in the kernel source.
.\"
.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).
This avoids the need to decide how to partition resources between
processes which are members of cgroup A and processes in child cgroups of A.
@ -480,12 +508,8 @@ the relationship between processes in
and
.IR /cg1 's
other children.
.TP
2. Active cgroups must be specified
The unified hierarchy presents two new files,
.IR cgroup.controllers
and
.IR cgroup.subtree_control .
.\"
.SS Cgroups v2 subtree control
When a cgroup
.I A/b
is created, its
@ -502,20 +526,6 @@ controller is not enabled in
.IR /A/B ,
then it cannot be enabled in
.IR /A/B/C .
.TP
3. No "tasks" or "cgroup.clone_children" files
.TP
4. Empty cgroup notification
A new file,
.IR cgroup.populated ,
under each cgroup contains '0' when the
cgroup is empty, and 1 when it is populated.
It therefore may be watched to detect when a cgroup becomes (non-)empty.
This replaces the original notify-on-release mechanism.
.PP
For more changes, see the
.I Documentation/cgroup-v2.txt
file in the kernel source.
.\"
.SS Cgroups v2 events file
A new feature in cgroups v2 is the