]> git.karo-electronics.de Git - karo-tx-linux.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)
commite132b9b3bc7f19e9b158e42b323881d5dee5ecf3
treea0a6110382cfc74e379542505edbc0466894f6de
parent3b99669b75db04e411bb298591224a9e8e4f57fb
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