From 96e95182e95fd4e0069ff4d6ee1888fe9031d154 Mon Sep 17 00:00:00 2001 From: "tuukka.tikkanen@linaro.org" Date: Mon, 24 Feb 2014 08:29:35 +0200 Subject: [PATCH] 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 Signed-off-by: Rafael J. Wysocki --- Reading git-format-patch failed