Re: [PATCH] cpuidle: teo: Keep the tick when intercepts predict a short idle period
From: Navon John Lukose
Date: Wed Dec 02 2026 - 09:56:14 EST
On Wed, 2 Dec 2026 12:37:32 +0000, Christian Loehle wrote:
> thanks for the patch, I think it makes sense.
> Do you mind just dumping the state counts / duration deltas, IMO that
> would be more readable.
Sure. Stock -> patched, summed over all 16 CPUs per second of wall time.
Residency is the share of total CPU time spent in the state. above
counts stays shorter than the state's own target residency, below
counts stays long enough for the next deeper state's (381 us for C1,
3144 us for C2).
The machine has 16 CPUs without SMT: 6 P-cores, 8 E-cores and 2 LP
E-cores. The pipe and timer loads ran on the cores named below; all
other CPUs, the LP E-cores included, only saw background activity.
Idle, display off, 7 stock / 8 patched interleaved rounds of 100 s
(one noisy stock round was dropped), the same runs as the changelog
numbers:
entries/s residency % above/s below/s
POLL 0.3 -> 0.3 0.00 -> 0.00 0.0 -> 0.0 0.2 -> 0.2
C1 139.6 -> 110.8 3.06 -> 0.21 0.3 -> 0.3 43.1 -> 30.6
C2 121.5 -> 104.8 3.27 -> 2.57 11.4 -> 7.8 12.8 -> 8.6
C3 472.2 -> 501.8 92.99 -> 96.59 115.4 -> 118.2 0.0 -> 0.0
Periodic loads, 6 interleaved rounds of 45 s each.
Pipe wakeups every 1.5 ms, writer and reader on E-cores 7 and 9:
entries/s residency % above/s below/s
POLL 2.8 -> 5.0 0.00 -> 0.00 0.0 -> 0.0 2.2 -> 4.2
C1 117.3 -> 303.9 2.24 -> 0.88 3.0 -> 4.5 34.9 -> 140.3
C2 1490.2 -> 1452.4 13.52 -> 12.79 36.3 -> 60.7 2.7 -> 2.7
C3 286.2 -> 292.5 83.90 -> 85.98 57.0 -> 57.3 0.0 -> 0.0
Pipe wakeups every 2 ms, writer and reader on E-cores 7 and 9:
entries/s residency % above/s below/s
POLL 2.3 -> 3.3 0.00 -> 0.00 0.0 -> 0.0 2.0 -> 2.8
C1 81.4 -> 196.1 1.57 -> 0.59 2.1 -> 4.4 28.4 -> 108.3
C2 1060.7 -> 1041.9 13.14 -> 13.01 10.1 -> 10.1 2.1 -> 2.4
C3 285.4 -> 263.6 85.00 -> 86.11 59.5 -> 51.6 0.0 -> 0.0
Pipe wakeups every 2.5 ms, writer and reader on E-cores 7 and 9:
entries/s residency % above/s below/s
POLL 3.3 -> 3.9 0.00 -> 0.00 0.0 -> 0.0 3.1 -> 3.6
C1 90.6 -> 145.6 1.71 -> 0.41 3.2 -> 4.0 29.0 -> 66.2
C2 874.0 -> 871.8 13.32 -> 13.29 12.2 -> 11.4 2.5 -> 2.9
C3 303.9 -> 291.5 84.69 -> 86.02 62.7 -> 63.9 0.0 -> 0.0
Pipe wakeups every 3 ms, writer and reader on P-cores 2 and 4:
entries/s residency % above/s below/s
POLL 4.8 -> 3.3 0.00 -> 0.00 0.0 -> 0.0 3.6 -> 2.7
C1 93.0 -> 148.5 1.86 -> 0.48 3.7 -> 2.8 30.7 -> 80.2
C2 749.1 -> 731.3 13.31 -> 13.19 12.1 -> 8.8 3.0 -> 3.1
C3 293.1 -> 282.6 84.50 -> 86.01 63.6 -> 60.4 0.0 -> 0.0
Timer wakeups every 2 ms on P-core 3:
entries/s residency % above/s below/s
POLL 3.5 -> 10.5 0.00 -> 0.00 0.0 -> 0.0 2.8 -> 10.2
C1 87.2 -> 146.4 2.05 -> 0.45 4.0 -> 2.9 31.1 -> 70.4
C2 568.5 -> 550.2 7.42 -> 7.20 6.3 -> 7.4 3.5 -> 3.3
C3 295.0 -> 294.2 90.14 -> 91.95 61.3 -> 58.1 0.0 -> 0.0
Under the periodic loads C1 is entered more often and its below count
rises because a wrong C1 pick now ends at the next tick and teo selects
again, instead of lasting until the next timer. below counts stays
rather than time, and about half of the C1 stays reach C2's 381 us, so
the count goes up while C1 residency drops by a factor of 2.5 to 4.5
(mean C1 stay 3.0-3.8 ms -> 0.45-0.52 ms).
If any other measurements would help, I can run them.
Navon