From: Tejun Heo <tj@kernel.org>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>,
cgroups@vger.kernel.org, hannes@cmpxchg.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
lizefan.x@bytedance.com, shuah@kernel.org
Subject: Re: [PATCH v2 0/2] Exposing nice CPU usage to userspace
Date: Tue, 10 Sep 2024 11:01:07 -1000 [thread overview]
Message-ID: <ZuCzk2CsLGAliHzQ@slm.duckdns.org> (raw)
In-Reply-To: <mhugflcvgtv2iwyz2i63dkteur3xhnqn5qi37gzwc7mkt4sfn7@32kenf3bnhzf>
Hello, Michal.
On Mon, Sep 02, 2024 at 05:45:39PM +0200, Michal Koutný wrote:
> - It makes (some) sense only on leave cgroups (where variously nice'd
> tasks are competing against each other). Not so much on inner node
> cgroups (where it's a mere sum but sibling cgroups could have different
> weights, so the absolute times would contribute differently).
>
> - When all tasks have nice > 0 (or nice <= 0), it loses any information
> it could have had.
I think it's as useful as system-wide nice metric is. It's not a versatile
metric but is widely available and understood and people use it. Maybe a
workload is split across a sub-hierarchy and they wanna collect how much
lowpri threads are consuming. cpu.stats is available without cpu control
being enabled and people use it as a way to just aggregate metrics across a
portion of the system.
> (Thus I don't know whether to commit to exposing that value via cgroups.)
>
> I wonder, wouldn't your use case be equally served by some
> post-processing [1] of /sys/kernel/debug/sched/debug info which is
> already available?
...
> above is only for CPU nr=0. So processing would mean sampling that file
> over all CPUs and time.
I think there are benefits to mirroring system wide metrics, at least ones
as widely spread as nice.
Thanks.
--
tejun
prev parent reply other threads:[~2024-09-10 21:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-30 14:19 [PATCH v2 0/2] Exposing nice CPU usage to userspace Joshua Hahn
2024-08-30 14:19 ` [PATCH v2 1/2] Tracking cgroup-level niced CPU time Joshua Hahn
2024-08-30 19:41 ` Tejun Heo
2024-08-30 20:06 ` Joshua Hahn
2024-08-30 14:19 ` [PATCH v2 2/2] Selftests for niced CPU statistics Joshua Hahn
2024-09-02 15:45 ` [PATCH v2 0/2] Exposing nice CPU usage to userspace Michal Koutný
2024-09-10 21:01 ` 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=ZuCzk2CsLGAliHzQ@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=joshua.hahnjy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=mkoutny@suse.com \
--cc=shuah@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