]> git.baikalelectronics.ru Git - kernel.git/commit
cpuidle: menu: use high confidence factors only when considering polling
authorRik van Riel <riel@redhat.com>
Wed, 16 Mar 2016 16:14:00 +0000 (12:14 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 17 Mar 2016 01:40:32 +0000 (02:40 +0100)
commit5c94b2fc40cda4150fa3c84e7dd19f9e61daa3d5
treea0a6110382cfc74e379542505edbc0466894f6de
parentd30f70fef58afee1941dbccfea768e27a5c079d9
cpuidle: menu: use high confidence factors only when considering polling

The menu governor uses five different factors to pick the
idle state:
 - the user configured latency_req
 - the time until the next timer (next_timer_us)
 - the typical sleep interval, as measured recently
 - an estimate of sleep time by dividing next_timer_us by an observed factor
 - a load corrected version of the above, divided again by load

Only the first three items are known with enough confidence that
we can use them to consider polling, instead of an actual CPU
idle state, because the cost of being wrong about polling can be
excessive power use.

The latter two are used in the menu governor's main selection
loop, and can result in choosing a shallower idle state when
the system is expected to be busy again soon.

This pushes a busy system in the "performance" direction of
the performance<>power tradeoff, when choosing between idle
states, but stays more strictly on the "power" state when
deciding between polling and C1.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/menu.c