[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <180b4c3f-9ea2-4124-b014-226ff8a97877@huaweicloud.com>
Date: Fri, 18 Jul 2025 17:26:54 +0800
From: Chen Ridong <chenridong@...weicloud.com>
To: Michal Koutný <mkoutny@...e.com>,
Tejun Heo <tj@...nel.org>
Cc: Tiffany Yang <ynaffit@...gle.com>, linux-kernel@...r.kernel.org,
John Stultz <jstultz@...gle.com>, Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>,
Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Johannes Weiner <hannes@...xchg.org>, "Rafael J. Wysocki"
<rafael@...nel.org>, Pavel Machek <pavel@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Chen Ridong <chenridong@...wei.com>, kernel-team@...roid.com,
Jonathan Corbet <corbet@....net>, cgroups@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [RFC PATCH v2] cgroup: Track time in cgroup v2 freezer
On 2025/7/18 16:20, Michal Koutný wrote:
> On Thu, Jul 17, 2025 at 07:05:14AM -1000, Tejun Heo <tj@...nel.org> wrote:
>> I wonder what hierarchical summing would look like for this.
>
> So do I.
> Thus I meant to expose this only in a *.local file not the hierarchical
> one.
>
> But I realize it should [1] match cpu.stat[.local]:thottled_usec
> since they're similar quantities in principle.
> - cpu.stat:thottled_usec
> - sums the time the cgroup's quota was in effect
> - not hierarchical (:-/)
> - cpu.stat.local:thottled_usec
> - not hierarchical
> - sums the time cgroup's or ancestor's quota was in effect
> -> IIUC this is what's the motivation of the original patch
>
> HTH,
> Michal
>
> [1] I'd find it more logical if
> cpu.stat:thottled_usec were cpu.stat.local:thottling_usec and
> cpu.stat.local:thottled_usec were cpu.stat.local:throttled_usec.
> Only to illustrate my understanding of hierarchy in cpu.stat, it doesn't
> matter since it's what it is now.
Hi Michal and TJ,
I'd like to raise a separate thought unrelated to the current discussion.:)
With the recent merge of the series "cgroup: separate rstat trees," the rstat are not bound to CPU
system. This makes me wonder: should we consider moving the cpu.stat and cpu.stat.local interfaces
to the CPU subsystem?
The CPU subsystem could then align more closely with other resource controllers like memory or I/O
subsystems. By decoupling these CPU-specific statistics from the cgroup core, it could help keep
both cgroup and rstat implementations more focused.
Is there any particular reason why the CPU subsystem must remain bound to the cgroup core?
Looking forward to your insights.
Best regards,
Ridong
Powered by blists - more mailing lists