From: Vaidyanathan Srinivasan Date: Mon, 8 Feb 2010 10:05:55 +0000 (+0530) Subject: sched: Fix sched_mv_power_savings for !SMT X-Git-Tag: firefly_0821_release~10186^2~2036 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d9d9736709a7fbe2ecee46e4775c825263545ad4;p=firefly-linux-kernel-4.4.55.git sched: Fix sched_mv_power_savings for !SMT commit 28f5318167adf23b16c844b9c2253f355cb21796 upstream. Fix for sched_mc_powersavigs for pre-Nehalem platforms. Child sched domain should clear SD_PREFER_SIBLING if parent will have SD_POWERSAVINGS_BALANCE because they are contradicting. Sets the flags correctly based on sched_mc_power_savings. Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Peter Zijlstra LKML-Reference: <20100208100555.GD2931@dirshya.in.ibm.com> Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/sched.h b/include/linux/sched.h index e48311e8c923..70abfd3ee0aa 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -864,7 +864,10 @@ static inline int sd_balance_for_mc_power(void) if (sched_smt_power_savings) return SD_POWERSAVINGS_BALANCE; - return SD_PREFER_SIBLING; + if (!sched_mc_power_savings) + return SD_PREFER_SIBLING; + + return 0; } static inline int sd_balance_for_package_power(void)