cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Vishal Chourasia <vishalc@linux.ibm.com>
Cc: "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, bagasdotme@gmail.com,
	llong@redhat.com
Subject: Re: [PATCH v3] Documentation: cgroup: add section explaining controller availability
Date: Mon, 9 Jun 2025 08:05:51 -1000	[thread overview]
Message-ID: <aEcif8PgY3GAbBWI@slm.duckdns.org> (raw)
In-Reply-To: <20250606041004.12753-2-vishalc@linux.ibm.com>

On Fri, Jun 06, 2025 at 09:40:05AM +0530, Vishal Chourasia wrote:
> Add "Availability" section to Control Group v2 docs. It describes the
> meaning of a controller being available in a cgroup, complementing the
> existing "Enabling and Disabling" section.
> 
> This update improves the clarity of cgroup controller management by
> explicitly distinguishing between:
> 
> 1. Availability – when a controller is supported by the kernel and
>    listed in "cgroup.controllers", making its interface files accessible
>    in the cgroup's directory.
> 2. Enabling – when a controller is enabled via explicitly writing the
>    name of the controller to "cgroup.subtree_control" to control
>    distribution of resource across the cgroup's immediate children.
> 
> 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 enabled by default
> /sys/fs/cgroup # echo +cpu +memory > cgroup.subtree_control # enabling "cpu" and "memory"
> /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
> 
> In this example, "cpu" and "memory" are enabled in the root cgroup,
> making them available in "foo_cgrp". This exposes the corresponding
> interface files in "foo_cgrp/", allowing resource control of processes
> in that cgroup. However, these controllers are not yet enabled in
> "foo_cgrp" itself.
> 
> Once a controller is available in a cgroup it can be used to resource
> control processes of the cgroup.
> 
> Acked-by: Michal Koutný <mkoutny@suse.com>
> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
> Signed-off-by: Vishal Chourasia <vishalc@linux.ibm.com>

Applied to cgroup/for-6.17.

Thanks.

-- 
tejun

      reply	other threads:[~2025-06-09 18:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06  4:10 [PATCH v3] Documentation: cgroup: add section explaining controller availability Vishal Chourasia
2025-06-09 18:05 ` Tejun Heo [this message]

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=aEcif8PgY3GAbBWI@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=bagasdotme@gmail.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=llong@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=vishalc@linux.ibm.com \
    /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).