diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2018-10-14 13:56:27 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2018-10-14 13:56:27 +0200 |
| commit | c9a35b01a1983ff9277202f0c8e2975b2e57ac02 (patch) | |
| tree | b3624489a1fe1606d4c4dda3af0ddb02666359bb /man7 | |
| parent | d190902bc2639b1bb991689f9ee22a4055c59705 (diff) | |
| download | man-pages-c9a35b01a1983ff9277202f0c8e2975b2e57ac02.tar.gz | |
cgroup_namespaces.7: Clarify
Clarify the example by making an implied detail more explicit.
Quoting the Troy Engel on the problem with the original text:
The problem is "and a process in a sibling cgroup (sub2)"
(shown as PID 20124 here) - how did this get here? How do I
recreate this? Following this example, there's no mention of
how, it's out of place when following the instructions.
There is nothing in any of the cgroup files which contain
this (# grep freezer /proc/*/cgroup) while at this stage.
The intent is understood, however the man page seems to skip
a step to create this in the teaching example. We should add
whatever simple steps are needed to create the "process in a
sibling cgroup" as outlined so it makes sense - as written,
I have no clue where "sibling cgroup (sub2)" came from, it
just appeared out of the blue in that step. Thanks!
See https://bugzilla.kernel.org/show_bug.cgi?id=201047
Reported-by: Troy Engel <troyengel@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7')
| -rw-r--r-- | man7/cgroup_namespaces.7 | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/man7/cgroup_namespaces.7 b/man7/cgroup_namespaces.7 index 135e5d7bd8..72a473cf6b 100644 --- a/man7/cgroup_namespaces.7 +++ b/man7/cgroup_namespaces.7 @@ -67,9 +67,24 @@ entries for each ancestor level in the cgroup hierarchy. .PP The following shell session demonstrates the effect of creating a new cgroup namespace. +.PP First, (as superuser) we create a child cgroup in the .I freezer -hierarchy, and put the shell into that cgroup: +hierarchy, and place a process in that cgroup that we will +use as part of the demonstration below: +.PP +.in +4n +.EX +# \fBmkdir \-p /sys/fs/cgroup/freezer/sub2\fP +# \fBsleep 10000 &\fP # Create a process that lives for a while +[1] 20124 +# \fBecho 20124 > /sys/fs/cgroup/freezer/sub2/cgroup.procs\fP +.EE +.in +.PP +We then create another child cgroup in the +.I freezer +hierarchy and put the shell into that cgroup: .PP .in +4n .EX @@ -98,7 +113,7 @@ files of, respectively, the new shell process started by the .BR unshare (1) command, a process that is in the original cgroup namespace .RI ( init , -with PID 1), and a process in a sibling cgroup +with PID 1), and the process in the sibling cgroup .RI ( sub2 ): .PP .EX |
