cgroups.7: Substantial reworking of text on v1 cgroup release notification

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-10-07 16:33:08 +02:00
parent 88afe701da
commit 23388d411f
1 changed files with 36 additions and 8 deletions

View File

@ -403,16 +403,44 @@ Note that files in a cgroup directory cannot and need not be
removed. removed.
.\" .\"
.SS Cgroups v1 release notification .SS Cgroups v1 release notification
A special file in each cgroup hierarchy, Two files can be used to determine whether the kernel provides
notifications when a cgroup becomes empty.
A cgroup is considered to be empty when it contains no child
cgroups and no member processes.
A special file in the root directory of each cgroup hierarchy,
.IR release_agent , .IR release_agent ,
can be used to register a program to handle cgroups which become newly empty. can be used to register the pathname of a program that may be invoked when
The program will be called each time a cgroup marked for a cgroup in the hierarchy becomes empty.
autoremove becomes empty and childless. The pathname of the newly empty cgroup (relative to the cgroup mount point)
The cgroup path will be provided as the first command-line argument. is provided as the sole command-line argument when the
The cgroup must be marked as eligible for autoremove by writing '1' into its .IR release_agent
program is invoked.
The
.IR release_agent
program might remove the cgroup directory,
or perhaps repopulate with a process.
The default value of the
.IR release_agent
file is empty, meaning that no release agent is invoked.
Whether or not the
.IR release_agent
program is invoked when a particular cgroup becomes empty is determined
by the value in the
.IR notify_on_release .IR notify_on_release
file; file in the corresponding cgroup directory.
this value is inherited by newly created child cgroups. If this file contains the value 0, then the
.IR release_agent
program is not invoked.
If it contains the value 1, the
.IR release_agent
program is invoked.
The default value for this file in the root cgroup is 0.
At the time when a new cgroup is created,
the value in this file is inherited from the corresponding file
in the parent cgroup.
.\" .\"
.SS Cgroups version 2 .SS Cgroups version 2
In cgroups v2, In cgroups v2,