]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
cpuidle: menu: Avoid computations for very close timers
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 2 Oct 2018 21:46:28 +0000 (23:46 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 4 Oct 2018 17:27:27 +0000 (19:27 +0200)
commit8b007ebec9a5d120d25c00d9b771aadf45ac5177
tree1b6cf4c40c0fbe96f9e2343375e689d9cbc534c3
parenteb40a380bff28f84b6583bba6786b46ef26ef548
cpuidle: menu: Avoid computations for very close timers

If the next timer event (not including the tick) is closer than the
target residency of the second state or the PM QoS latency constraint
is below its exit latency, state[0] will be used regardless of any
other factors, so skip the computations in menu_select() then and
return 0 straight away from it.

Still, do that after the bucket has been determined to avoid
updating the correction factor for a stale bucket.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
drivers/cpuidle/governors/menu.c