[RFC] sched: clarify why cpu.stat throttled_usec deltas can exceed elapsed time
From: Artur Onysko
Date: Tue Dec 01 2026 - 13:39:39 EST
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