aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>2010-06-08 00:57:02 -0400
committerIngo Molnar <mingo@elte.hu>2010-06-09 04:34:54 -0400
commit9d5efe05eb0c904545a28b19c18b949f23334de0 (patch)
treeafa28fe2f3abd6fb538a7f0039c75a5e6463eeb1 /include/linux/sched.h
parent83cd4fe27ad8446619b2e030b171b858501de87d (diff)
sched: Fix capacity calculations for SMT4
Handle cpu capacity being reported as 0 on cores with more number of hardware threads. For example on a Power7 core with 4 hardware threads, core power is 1177 and thus power of each hardware thread is 1177/4 = 294. This low power can lead to capacity for each hardware thread being calculated as 0, which leads to tasks bouncing within the core madly! Fix this by reporting capacity for hardware threads as 1, provided their power is not scaled down significantly because of frequency scaling or real-time tasks usage of cpu. Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arjan van de Ven <arjan@linux.intel.com> LKML-Reference: <20100608045702.21D03CC895@localhost.localdomain> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index a3e5b1cd043..c731296e5e9 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -857,7 +857,7 @@ struct sched_group {
857 * CPU power of this group, SCHED_LOAD_SCALE being max power for a 857 * CPU power of this group, SCHED_LOAD_SCALE being max power for a
858 * single CPU. 858 * single CPU.
859 */ 859 */
860 unsigned int cpu_power; 860 unsigned int cpu_power, cpu_power_orig;
861 861
862 /* 862 /*
863 * The CPUs this group covers. 863 * The CPUs this group covers.