diff options
author | Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> | 2010-02-08 05:05:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-15 12:07:12 -0400 |
commit | 39226dabf8fe6cbd07ce5c5155f43c25b48abbd1 (patch) | |
tree | 58324792f5e972cded378885c324f4f4b3b10e8b | |
parent | 065bc5cd9917ac5ae2c26c4ac9adecdae437a17a (diff) |
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 <svaidy@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100208100555.GD2931@dirshya.in.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | include/linux/sched.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 78efe7c485ac..1f5fa53b46b1 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -878,7 +878,10 @@ static inline int sd_balance_for_mc_power(void) | |||
878 | if (sched_smt_power_savings) | 878 | if (sched_smt_power_savings) |
879 | return SD_POWERSAVINGS_BALANCE; | 879 | return SD_POWERSAVINGS_BALANCE; |
880 | 880 | ||
881 | return SD_PREFER_SIBLING; | 881 | if (!sched_mc_power_savings) |
882 | return SD_PREFER_SIBLING; | ||
883 | |||
884 | return 0; | ||
882 | } | 885 | } |
883 | 886 | ||
884 | static inline int sd_balance_for_package_power(void) | 887 | static inline int sd_balance_for_package_power(void) |