public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: "Barro Raffel, Willy" <willybar@amazon.com>
To: Tejun Heo <tj@kernel.org>
Cc: "Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Bouron, Justinien" <jbouron@amazon.com>,
	"Kudrjavets, Gunnar" <gunnarku@amazon.com>
Subject: Re: [PATCH] cgroup: add cpu.stat.percpu for per-CPU cgroup stats
Date: Tue, 7 Apr 2026 20:24:33 +0000	[thread overview]
Message-ID: <adVoAK8ekj61qykD@6c7e67b75e78> (raw)
In-Reply-To: <adVMne0wsVCvc2hH@slm.duckdns.org>

On Tue, Apr 07, 2026 at 08:27:41AM -1000, Tejun Heo wrote:
>On Mon, Apr 06, 2026 at 06:06:43PM -0700, Willy Barro Raffel wrote:
>> Expose per-CPU subtree_bstat via a new cgroupfs file cpu.stat.percpu.
>> Each line shows one CPU cumulative stats in io.stat-style key=value
>> format:
>>
>>   cpu0 usage_usec=123 user_usec=45 system_usec=78 nice_usec=0
>>   cpu1 usage_usec=456 user_usec=123 system_usec=333 nice_usec=0
>>
>> This completes the interface left as a TODO in commit 7716f383a583
>> ("Merge tag 'cgroup-for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup")
>> which added per-CPU subtree_bstat but only exposed it via BPF/drgn.
>
>Given how quickly cpu count is increasing with 1k CPUs on common prod
>machines not too far off, I'm not sure naively formatting output for every
>possible CPU is desirable.
>
>Thanks.
>
>--
>tejun

Good point. I can skip CPUs with zero stats in the output, i.e.: a cgroup running on 4 of 1024 CPUs would only produce 4 lines. Would that address your concern?

  reply	other threads:[~2026-04-07 20:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  1:06 [PATCH] cgroup: add cpu.stat.percpu for per-CPU cgroup stats Willy Barro Raffel
2026-04-07 18:27 ` Tejun Heo
2026-04-07 20:24   ` Barro Raffel, Willy [this message]
2026-04-08 12:30     ` Michal Koutný
2026-04-08 18:31       ` Barro Raffel, Willy

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=adVoAK8ekj61qykD@6c7e67b75e78 \
    --to=willybar@amazon.com \
    --cc=cgroups@vger.kernel.org \
    --cc=gunnarku@amazon.com \
    --cc=hannes@cmpxchg.org \
    --cc=jbouron@amazon.com \
    --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