Skip to content

Commit

Permalink
sched: Fix sched_mv_power_savings for !SMT
Browse files Browse the repository at this point in the history
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>
Cc: stable@kernel.org [2.6.32.x]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
svaidy authored and KAGA-KOKO committed Feb 16, 2010
1 parent 50200df commit 28f5318
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,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)
Expand Down

0 comments on commit 28f5318

Please sign in to comment.