Skip to content

Commit 069ce2e

Browse files
committed
cpuidle: teo: Ignore disabled idle states that are too deep
Prevent disabled CPU idle state with target residencies beyond the anticipated idle duration from being taken into account by the TEO governor. Fixes: b26bf6a ("cpuidle: New timer events oriented governor for tickless systems") Signed-off-by: Rafael J. Wysocki <[email protected]> Cc: 5.1+ <[email protected]> # 5.1+
1 parent 4f5cafb commit 069ce2e

File tree

1 file changed

+7
-0
lines changed
  • drivers/cpuidle/governors

1 file changed

+7
-0
lines changed

drivers/cpuidle/governors/teo.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,13 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
257257
struct cpuidle_state_usage *su = &dev->states_usage[i];
258258

259259
if (s->disabled || su->disable) {
260+
/*
261+
* Ignore disabled states with target residencies beyond
262+
* the anticipated idle duration.
263+
*/
264+
if (s->target_residency > duration_us)
265+
continue;
266+
260267
/*
261268
* If the "early hits" metric of a disabled state is
262269
* greater than the current maximum, it should be taken

0 commit comments

Comments
 (0)