@@ -429,10 +429,13 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
idx = 0;
goto out_tick;
}
- /* Assume that state 1 is not a polling one and use it. */
+ /*
+ * Assume that state 1 is not a polling one and use it, but
+ * don't stop the tick as we expect to be woken up early.
+ */
idx = 1;
duration_ns = drv->states[1].target_residency_ns;
- goto end;
+ goto out_tick_state;
}
/* Compute the sums of metrics for early wakeup pattern detection. */
@@ -618,6 +621,7 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
duration_ns >= TICK_NSEC) || tick_nohz_tick_stopped())
return idx;
+out_tick_state:
/*
* The tick is not going to be stopped, so if the target residency of
* the state to be returned is not within the time till the closest
As we expect to be woken up early, stopping the tick is likely to be a waste. Signed-off-by: Christian Loehle <christian.loehle@arm.com> --- drivers/cpuidle/governors/teo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)