diff --git a/man7/cgroups.7 b/man7/cgroups.7 index 241cb17be..ceb7409bf 100644 --- a/man7/cgroups.7 +++ b/man7/cgroups.7 @@ -403,16 +403,44 @@ Note that files in a cgroup directory cannot and need not be removed. .\" .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 , -can be used to register a program to handle cgroups which become newly empty. -The program will be called each time a cgroup marked for -autoremove becomes empty and childless. -The cgroup path will be provided as the first command-line argument. -The cgroup must be marked as eligible for autoremove by writing '1' into its +can be used to register the pathname of a program that may be invoked when +a cgroup in the hierarchy becomes empty. +The pathname of the newly empty cgroup (relative to the cgroup mount point) +is provided as the sole command-line argument when the +.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 -file; -this value is inherited by newly created child cgroups. +file in the corresponding cgroup directory. +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 In cgroups v2,