diff options
author | tuukka.tikkanen@linaro.org <tuukka.tikkanen@linaro.org> | 2014-02-24 08:29:35 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-03-06 01:45:59 +0100 |
commit | 96e95182e95fd4e0069ff4d6ee1888fe9031d154 (patch) | |
tree | dfb20bf37e38982972b7fde9a0e7e8729aa3db22 /drivers/cpuidle/driver.c | |
parent | 61c66d6efa23759f1061d80ced668977fd28337d (diff) |
cpuidle: Move perf multiplier calculation out of the selection loop
The menu governor performance multiplier defines a minimum predicted
idle duration to latency ratio. Instead of checking this separately
in every iteration of the state selection loop, adjust the overall
latency restriction for the whole loop if this restriction is tighter
than what is set by the QoS subsystem.
The original test
s->exit_latency * multiplier > data->predicted_us
becomes
s->exit_latency > data->predicted_us / multiplier
by dividing both sides of the comparison by "multiplier".
While division is likely to be several times slower than multiplication,
the minor performance hit allows making a generic sleep state selection
function based on (sleep duration, maximum latency) tuple.
Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle/driver.c')
0 files changed, 0 insertions, 0 deletions