summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2014-12-16 01:52:07 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-17 02:26:28 +0100
commitb73026b9c959600bcd65eeae7a5f7ac00ded886f (patch)
treea95a286bd8bde9f152624390921f76ec049bb516 /drivers/nfc
parent4108b3d96273784f697dd6d8e59ef9203a10a02d (diff)
downloadop-kernel-dev-b73026b9c959600bcd65eeae7a5f7ac00ded886f.zip
op-kernel-dev-b73026b9c959600bcd65eeae7a5f7ac00ded886f.tar.gz
cpuidle: ladder: Better idle duration measurement without using CPUIDLE_FLAG_TIME_INVALID
When the ladder governor sees the CPUIDLE_FLAG_TIME_INVALID flag, it unconditionally causes a state promotion by setting last_residency to a number higher than the state's promotion_time: last_residency = last_state->threshold.promotion_time + 1 It does this for fear that cpuidle_get_last_residency() will be in-accurate, because cpuidle_enter_state() invoked a state with CPUIDLE_FLAG_TIME_INVALID. But the only state with CPUIDLE_FLAG_TIME_INVALID is acpi_safe_halt(), which may return well after its actual idle duration because it enables interrupts, so cpuidle_enter_state() also measures interrupt service time. So what? In ladder, a huge invalid last_residency has exactly the same effect as the current code -- it unconditionally causes a state promotion. In the case where the idle residency plus measured interrupt handling time is less than the state's demotion_time -- we should use that timestamp to give ladder a chance to demote, rather than unconditionally promoting. This can be done by simply ignoring the CPUIDLE_FLAG_TIME_INVALID, and using the "invalid" time, as it is either equal to what we are doing today, or better. Signed-off-by: Len Brown <len.brown@intel.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/nfc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud