Skip to content

cpuidle: teo: Refine handling of short idle intervals

Rafael J. Wysocki linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cpuidle: teo: Move candidate state lookup to separate functiondrivers/cpuidle/governors/teo.c+63 -570 replies
2/2cpuidle: teo: Refine handling of short idle intervalsdrivers/cpuidle/governors/teo.c+55 -446 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/2] cpuidle: teo: Refine handling of short idle intervals

Hi Everyone,

This series is intended to address an issue with overly aggressive selection of idle state 0 (the polling state) in teo on x86 in some cases when timer wakeups dominate the CPU wakeup pattern.

In those cases, timer wakeups are not taken into account when they are within the LATENCY_THRESHOLD_NS range and the idle state selection may be based entirely on non-timer wakeups which may be rare. This causes the prediction accuracy to be low and too much energy may be used as a result.

The first patch is preparatory and it is not expected to make any functional difference.

The second patch causes teo to take timer wakeups into account if it is about to skip the tick_nohz_get_sleep_length() invocation, so they get a chance to influence the idle state selection.

I have been using this series on my systems for several weeks and observed a significant reduction of the polling state selection rate in multiple workloads.

Thanks!