Re: [PATCH v2] cgroup/cpu: document cpu.stat.local

From: Michal Koutný

Date: Fri Jun 26 2026 - 12:24:55 EST


Hi.

On Fri, Jun 26, 2026 at 09:09:14AM +0800, Sun Shaojie <sunshaojie@xxxxxxxxxx> wrote:
> + cpu.stat.local
> + A read-only flat-keyed file.
> + This file exists whether the controller is enabled or not.
> +
> + It reports the following stat when the controller is enabled:
> +
> + - throttled_usec
> +
> + Unlike the ``throttled_usec`` reported by ``cpu.stat`` which
> + accounts for throttling caused by this cgroup's own CFS
> + bandwidth limit, ``cpu.stat.local`` reports the actual
> + throttling time incurred by this cgroup's own runqueues,
> + which may include throttling inherited from ancestor
> + cgroup bandwidth limits.
> +
> + When the controller is not enabled, this stat is not reported.

I like that you contrast this to regular cpu.stat and implicitly explain
that cpu.stat is not hierarchical.
Here I think it's been such so long that it's not worth changing (also
it's less useful than existing metrics for diagnostics).
Hence would you also update the cpu.stat paragraph about the
non-hierarchical values?

Thanks,
Michal

Attachment: signature.asc
Description: PGP signature