mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] sched: clarify why cpu.stat throttled_usec deltas can exceed elapsed time
@ 2026-12-01 18:39 Artur Onysko
  0 siblings, 0 replies; only message in thread
From: Artur Onysko @ 2026-12-01 18:39 UTC (permalink / raw)
  To: linux-kernel

Hi,

cgroup v2 cpu.stat exports throttled_usec from cfs_b->throttled_time.
The CFS unthrottle path accumulates elapsed time from individual per-CPU
CFS run queues. Overlapping throttle intervals add to the same group
counter. In the simple example of two run queues each accumulating 10 ms
within the same 10 ms interval, the counter can advance by 20 ms.

Could the CFS bandwidth or cgroup v2 documentation say explicitly that
this statistic is cumulative run-queue throttle time and provide a small
example? A reader computing delta(throttled_usec) / elapsed time should
expect values above one. The example would make the existing units usable
without proposing a change to accounting.

https://github.com/torvalds/linux/blob/693c2e04e3f1d4c59af236e1211b7b8cb165a790/kernel/sched/fair.c#L7240-L7248
https://github.com/torvalds/linux/blob/693c2e04e3f1d4c59af236e1211b7b8cb165a790/kernel/sched/core.c#L10404-L10423
https://docs.kernel.org/scheduler/sched-bwc.html#statistics

The example is source-derived arithmetic. A delegated multi-CPU runtime
measurement is still needed. Source review and this RFC draft were
assisted by Codex.

Thanks,
Artur Onysko

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-01 18:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 18:39 [RFC] sched: clarify why cpu.stat throttled_usec deltas can exceed elapsed time Artur Onysko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®