Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpuidle: poll_state: Add time limit to poll_idle()
If poll_idle() is allowed to spin until need_resched() returns 'true', it may actually spin for a much longer time than expected by the idle governor, since set_tsk_need_resched() is not always called by the timer interrupt handler. If that happens, the CPU may spend much more time than anticipated in the "polling" state. To prevent that from happening, limit the time of the spinning loop in poll_idle(). Suggested-by: Peter Zijlstra <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Tested-by: Doug Smythies <[email protected]>
- Loading branch information