• T
    cpuidle: Move perf multiplier calculation out of the selection loop · 96e95182
    tuukka.tikkanen@linaro.org 提交于
    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: NTuukka Tikkanen <tuukka.tikkanen@linaro.org>
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    96e95182
menu.c 14.8 KB