cpuidle: teo: Adjust handling of very short idle times
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Mar 2021 18:19:03 +0000 (20:19 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Apr 2021 17:26:44 +0000 (19:26 +0200)
commitd3c33be1f350e7fd2b04381b000f3f950bd1ba77
treea89c96fbacaef035bb19cb2f19c48d3328d9162a
parent2ab80d46fead0309d7f190d8023c8d64b2ffcbd5
cpuidle: teo: Adjust handling of very short idle times

If the time till the next timer event is shorter than the target
residency of the first idle state (state 0), the TEO governor does
not update its metrics for any idle states, but arguably it should
record a "hit" for idle state 0 in that case, so modify it to do
that.

Accordingly, also make it record an "early hit" for idle state 0 if
the measured idle duration is less than its target residency, which
allows one branch more to be dropped from teo_update().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/teo.c