summaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-01-12 21:27:02 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-30 10:56:00 +0100
commit8e37e1a2a3295f5d99e6dbe99eca24eca7a034ef (patch)
tree438adb2db9f79ec2752cc045b97414b1be87a505 /drivers/cpuidle
parent2dc8ffad8c53e65f85d1a9ece2721463d729054a (diff)
downloadlinux-stable-8e37e1a2a3295f5d99e6dbe99eca24eca7a034ef.tar.gz
linux-stable-8e37e1a2a3295f5d99e6dbe99eca24eca7a034ef.tar.bz2
linux-stable-8e37e1a2a3295f5d99e6dbe99eca24eca7a034ef.zip
cpuidle/menu: stop seeking deeper idle if current state is deep enough
Obsolete commit 71abbbf856a0 (cpuidle: extend cpuidle and menu governor to handle dynamic states) wanted to introduce dynamic C-states, but that idea was dropped long ago. The nonsense deeper C-state checking remained, though. Since both target_residency and exit_latency are longer for deeper idle state, there's no need to waste CPU time on useless checks. Signed-off-by: Alex Shi <alex.shi@linaro.org> Acked-by: Rik van Riel <riel@redhat.com> [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/governors/menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index d9b5b9398a0f..07e36bb54006 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -357,9 +357,9 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
if (s->disabled || su->disable)
continue;
if (s->target_residency > data->predicted_us)
- continue;
+ break;
if (s->exit_latency > latency_req)
- continue;
+ break;
data->last_state_idx = i;
}