From: Vishal Chourasia <vishalc@linux.ibm.com>
To: "Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Jonathan Corbet" <corbet@lwn.net>,
cgroups@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Vishal Chourasia <vishalc@linux.ibm.com>
Subject: [PATCH] Documentation: cgroup: clarify controller enabling semantics
Date: Tue, 27 May 2025 14:23:36 +0530 [thread overview]
Message-ID: <20250527085335.256045-2-vishalc@linux.ibm.com> (raw)
The documentation for cgroup controller management has been updated to
be more consistent regarding following concepts:
What does it mean to have controllers
1) available in a cgroup, vs.
2) enabled in a cgroup
Which has been clearly defined below in the documentation.
"Enabling a controller in a cgroup indicates that the distribution of
the target resource across its immediate children will be controlled.
Consider the following sub-hierarchy"
As an example, consider
/sys/fs/cgroup # cat cgroup.controllers
cpuset cpu io memory hugetlb pids misc
/sys/fs/cgroup # cat cgroup.subtree_control # No controllers by default
/sys/fs/cgroup # echo +cpu +memory > cgroup.subtree_control
/sys/fs/cgroup # cat cgroup.subtree_control
cpu memory # cpu and memory enabled in /sys/fs/cgroup
/sys/fs/cgroup # mkdir foo_cgrp
/sys/fs/cgroup # cd foo_cgrp/
/sys/fs/cgroup/foo_cgrp # cat cgroup.controllers
cpu memory # cpu and memory available in 'foo_cgrp'
/sys/fs/cgroup/foo_cgrp # cat cgroup.subtree_control # empty by default
/sys/fs/cgroup/foo_cgrp # ls
cgroup.controllers cpu.max.burst memory.numa_stat
cgroup.events cpu.pressure memory.oom.group
cgroup.freeze cpu.stat memory.peak
cgroup.kill cpu.stat.local memory.pressure
cgroup.max.depth cpu.weight memory.reclaim
cgroup.max.descendants cpu.weight.nice memory.stat
cgroup.pressure io.pressure memory.swap.current
cgroup.procs memory.current memory.swap.events
cgroup.stat memory.events memory.swap.high
cgroup.subtree_control memory.events.local memory.swap.max
cgroup.threads memory.high memory.swap.peak
cgroup.type memory.low memory.zswap.current
cpu.idle memory.max memory.zswap.max
cpu.max memory.min memory.zswap.writeback
Once a controller is available in a cgroup it can be used to resource
control processes of the cgroup.
Signed-off-by: Vishal Chourasia <vishalc@linux.ibm.com>
---
Documentation/admin-guide/cgroup-v2.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 1a16ce68a4d7..0e1686511c45 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -438,8 +438,8 @@ Controlling Controllers
Enabling and Disabling
~~~~~~~~~~~~~~~~~~~~~~
-Each cgroup has a "cgroup.controllers" file which lists all
-controllers available for the cgroup to enable::
+Each cgroup has a cgroup.controllers file, which lists all the controllers
+available for that cgroup and which can be enabled for its children.
# cat cgroup.controllers
cpu io memory
--
2.49.0
next reply other threads:[~2025-05-27 9:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 8:53 Vishal Chourasia [this message]
2025-05-27 9:58 ` [PATCH] Documentation: cgroup: clarify controller enabling semantics Michal Koutný
2025-05-28 13:18 ` Vishal Chourasia
2025-05-28 17:05 ` Michal Koutný
2025-05-28 18:08 ` Vishal Chourasia
2025-05-28 13:31 ` Vishal Chourasia
2025-05-27 10:04 ` Bagas Sanjaya
2025-05-28 17:28 ` Vishal Chourasia
2025-05-28 15:23 ` Waiman Long
2025-05-28 15:45 ` Waiman Long
2025-05-28 17:37 ` Vishal Chourasia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250527085335.256045-2-vishalc@linux.ibm.com \
--to=vishalc@linux.ibm.com \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=hannes@cmpxchg.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).