From 7409b54bdda4f8c1cd0dc71c815eb7016617c717 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sat, 23 Dec 2017 10:27:11 +0100 Subject: [PATCH] cgroups.7: Add a section on unmounting cgroup v1 filesystems Signed-off-by: Michael Kerrisk --- man7/cgroups.7 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/man7/cgroups.7 b/man7/cgroups.7 index b52d81b5b..252a83495 100644 --- a/man7/cgroups.7 +++ b/man7/cgroups.7 @@ -231,6 +231,28 @@ in particular, .BR systemd (1) automatically creates such mount points. .\" +.SS Unmounting v1 controllers +A mounted cgroup filesystem can be unmounted using the +.BR umount (8) +command, as in the following example: +.PP +.in +4n +.EX +umount /sys/fs/cgroup/pids +.EE +.in +.PP +.IR "But note well" : +a cgroup filesystem is unmounted only if it is not busy, +that is, it has no child cgroups. +If this is not the case, then the only effect of the +.BR umount (8) +is to make the mount invisible. +Thus, to ensure that the mount point is really removed, +one must first remove all child cgroups, +which in turn can be done only after all member processes +have been moved from those cgroups to the root cgroup. +.\" .SS Cgroups version 1 controllers Each of the cgroups version 1 controllers is governed by a kernel configuration option (listed below).