From 5845e10bdbce1f021d0c0c0132e7d883d35e89d8 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 27 Dec 2017 20:28:39 +0100 Subject: [PATCH] cgroups.7: Document the cgroup.max.depth and cgroup.max.descendants files Signed-off-by: Michael Kerrisk --- man7/cgroups.7 | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/man7/cgroups.7 b/man7/cgroups.7 index 2f945c3de..a57652d2e 100644 --- a/man7/cgroups.7 +++ b/man7/cgroups.7 @@ -797,6 +797,42 @@ before being destroyed. A process can't be made a member of a dying cgroup, and a dying cgroup can't be brought back to life. .\" +.SS Limiting the number of descendant cgroups +Each cgroup in the v2 hierarchy contains the following files, +which can be used to view and set limits on the number +of descendant cgroups under that cgroup: +.TP +.IR cgroup.max.depth " (since Linux 4.14)" +.\" commit 1a926e0bbab83bae8207d05a533173425e0496d1 +This file defines a limit on the depth of nesting of descendant cgroups. +A value of 0 in this file means that no descendant cgroups can be created. +An attempt to create a descendant whose nesting level exceeds +the limit fails +.RI ( mkdir (2) +fails with the error +.BR EAGAIN ). +.IP +Writing the string +.IR """max""" +to this file means that no limit is imposed. +The default value in this file is +.IR """max""" . +.TP +.IR cgroup.max.descendants " (since Linux 4.14)" +.\" commit 1a926e0bbab83bae8207d05a533173425e0496d1 +This file defines a limit on the number of live descendant cgroups that +this cgroup may have. +An attempt to create more descendants than allowed by the limit fails +.RI ( mkdir (2) +fails with the error +.BR EAGAIN ). +.IP +Writing the string +.IR """max""" +to this file means that no limit is imposed. +The default value in this file is +.IR """max""" . +.\" .SS Cgroups v2 delegation In the context of cgroups, delegation means passing management of some subtree