aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorNikhil Rao <ncrao@google.com>2011-05-18 13:09:39 -0400
committerIngo Molnar <mingo@elte.hu>2011-05-20 08:16:50 -0400
commit1399fa7807a1a5998bbf147e80668e9950661dfa (patch)
treedc4e1a97f50b8e7297c82f63e1ad2b15430b33d9 /kernel/sched.c
parentf05998d4b80632f2cc00f108da503066ef5d38d5 (diff)
sched: Introduce SCHED_POWER_SCALE to scale cpu_power calculations
SCHED_LOAD_SCALE is used to increase nice resolution and to scale cpu_power calculations in the scheduler. This patch introduces SCHED_POWER_SCALE and converts all uses of SCHED_LOAD_SCALE for scaling cpu_power to use SCHED_POWER_SCALE instead. This is a preparatory patch for increasing the resolution of SCHED_LOAD_SCALE, and there is no need to increase resolution for cpu_power calculations. Signed-off-by: Nikhil Rao <ncrao@google.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com> Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Cc: Stephan Barwolf <stephan.baerwolf@tu-ilmenau.de> Cc: Mike Galbraith <efault@gmx.de> Link: http://lkml.kernel.org/r/1305738580-9924-3-git-send-email-ncrao@google.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index d036048b59a4..375e9c677d58 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6530,7 +6530,7 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
6530 cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group)); 6530 cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
6531 6531
6532 printk(KERN_CONT " %s", str); 6532 printk(KERN_CONT " %s", str);
6533 if (group->cpu_power != SCHED_LOAD_SCALE) { 6533 if (group->cpu_power != SCHED_POWER_SCALE) {
6534 printk(KERN_CONT " (cpu_power = %d)", 6534 printk(KERN_CONT " (cpu_power = %d)",
6535 group->cpu_power); 6535 group->cpu_power);
6536 } 6536 }
@@ -7905,7 +7905,7 @@ void __init sched_init(void)
7905#ifdef CONFIG_SMP 7905#ifdef CONFIG_SMP
7906 rq->sd = NULL; 7906 rq->sd = NULL;
7907 rq->rd = NULL; 7907 rq->rd = NULL;
7908 rq->cpu_power = SCHED_LOAD_SCALE; 7908 rq->cpu_power = SCHED_POWER_SCALE;
7909 rq->post_schedule = 0; 7909 rq->post_schedule = 0;
7910 rq->active_balance = 0; 7910 rq->active_balance = 0;
7911 rq->next_balance = jiffies; 7911 rq->next_balance = jiffies;