From: Joshua Hahn <joshua.hahnjy@gmail.com>
To: Tao Cui <cui.tao@linux.dev>
Cc: cgroups@vger.kernel.org, "Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
cuitao@kylinos.cn
Subject: Re: [PATCH] cgroup/cpu: document cpu.stat nice_usec and core_sched.force_idle_usec
Date: Mon, 20 Jul 2026 08:02:26 -0700 [thread overview]
Message-ID: <20260720150226.926730-1-joshua.hahnjy@gmail.com> (raw)
In-Reply-To: <20260718080100.2334415-1-cui.tao@linux.dev>
> From: Tao Cui <cuitao@kylinos.cn>
>
> cgroup_base_stat_cputime_show() unconditionally prints a fourth base
> stat, nice_usec, in addition to usage_usec/user_usec/system_usec, and
> also prints core_sched.force_idle_usec when CONFIG_SCHED_CORE is enabled.
> Neither field is currently described in the cpu.stat section of
> cgroup-v2.rst, which still states it "always reports the following three
> stats".
>
> nice_usec was added by commit aefa398d93d5 ("cgroup/rstat: Tracking
> cgroup-level niced CPU time") and core_sched.force_idle_usec by commit
> 1fcf54deb767 ("sched/core: add forced idle accounting for cgroups"); the
> documentation was not updated in either case.
>
> Update the cpu.stat description to list both fields and fix the count.
>
> Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Hello Tao, thank you for the patch! I should have updated this when
I added the nice stats. Thank you for finding this and updating it.
> ---
> Documentation/admin-guide/cgroup-v2.rst | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
> index 0df15a672cf3..778b759dd892 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -1144,12 +1144,18 @@ will be referred to. All time durations are in microseconds.
> A read-only flat-keyed file.
> This file exists whether the controller is enabled or not.
>
> - It always reports the following three stats, which account for all the
> + It always reports the following four stats, which account for all the
> processes in the cgroup (including those in descendant cgroups):
I have to ask, which tree is this based on? I can't seem to find a single
tree that contains the "(including those in descendant cgroups)" section
anywhere.
> - usage_usec
> - user_usec
> - system_usec
> + - nice_usec
> +
> + When core scheduling (CONFIG_SCHED_CORE) is enabled, an additional
> + stat is reported:
> +
> + - core_sched.force_idle_usec
>
> and the following five when the controller is enabled, which account for
> only the processes under the fair-class scheduler:
> --
> 2.43.0
Otherwise, the change looks good. I just wanted to know what it was based
on, in case I'm missing something. Thanks, have a great day!
Joshua
next prev parent reply other threads:[~2026-07-20 15:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 8:01 [PATCH] cgroup/cpu: document cpu.stat nice_usec and core_sched.force_idle_usec Tao Cui
2026-07-20 15:02 ` Joshua Hahn [this message]
2026-07-20 15:07 ` Michal Koutný
2026-07-20 15:27 ` Joshua Hahn
2026-07-21 1:26 ` Tao Cui
2026-07-20 15:26 ` Michal Koutný
2026-07-21 1:43 ` Tao Cui
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=20260720150226.926730-1-joshua.hahnjy@gmail.com \
--to=joshua.hahnjy@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=cui.tao@linux.dev \
--cc=cuitao@kylinos.cn \
--cc=hannes@cmpxchg.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=skhan@linuxfoundation.org \
--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