From: Jean Delvare Date: Mon, 11 Jan 2016 16:41:53 +0000 (+0100) Subject: cpuidle: Default to ladder governor on ticking systems X-Git-Tag: v4.5-rc2~19^2^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66a5f6b63996d8aa7cbe8841b38297bf3b338194;p=platform%2Fkernel%2Flinux-exynos.git cpuidle: Default to ladder governor on ticking systems The menu governor is currently the default on all systems. However the documentation claims that the ladder governor is preferred on ticking systems. So bump the rating of the ladder governor when NO_HZ is disabled, or when booting with nohz=off. This fixes the first half of kernel BZ #65531. Link: https://bugzilla.kernel.org/show_bug.cgi?id=65531 Signed-off-by: Jean Delvare Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c index 401c010..63bd5a4 100644 --- a/drivers/cpuidle/governors/ladder.c +++ b/drivers/cpuidle/governors/ladder.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -184,6 +185,14 @@ static struct cpuidle_governor ladder_governor = { */ static int __init init_ladder(void) { + /* + * When NO_HZ is disabled, or when booting with nohz=off, the ladder + * governor is better so give it a higher rating than the menu + * governor. + */ + if (!tick_nohz_enabled) + ladder_governor.rating = 25; + return cpuidle_register_governor(&ladder_governor); }