diff options
author | Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> | 2008-01-25 15:08:00 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-25 15:08:00 -0500 |
commit | 58e2d4ca581167c2a079f4ee02be2f0bc52e8729 (patch) | |
tree | 9a8c8324785800f3577fb897ca3e2ae21ad8c55a /kernel/sched_rt.c | |
parent | ec2c507fe8c8fa3c04fc6cb99a382a965c477379 (diff) |
sched: group scheduling, change how cpu load is calculated
This patch changes how the cpu load exerted by fair_sched_class tasks
is calculated. Load exerted by fair_sched_class tasks on a cpu is now
a summation of the group weights, rather than summation of task weights.
Weight exerted by a group on a cpu is dependent on the shares allocated
to it.
This version of patch has a minor impact on code size, but should have
no runtime/functional impact for !CONFIG_FAIR_GROUP_SCHED.
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 9ba3daa03475..cefcd5105146 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -32,6 +32,7 @@ static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup) | |||
32 | 32 | ||
33 | list_add_tail(&p->run_list, array->queue + p->prio); | 33 | list_add_tail(&p->run_list, array->queue + p->prio); |
34 | __set_bit(p->prio, array->bitmap); | 34 | __set_bit(p->prio, array->bitmap); |
35 | inc_cpu_load(rq, p->se.load.weight); | ||
35 | } | 36 | } |
36 | 37 | ||
37 | /* | 38 | /* |
@@ -46,6 +47,7 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) | |||
46 | list_del(&p->run_list); | 47 | list_del(&p->run_list); |
47 | if (list_empty(array->queue + p->prio)) | 48 | if (list_empty(array->queue + p->prio)) |
48 | __clear_bit(p->prio, array->bitmap); | 49 | __clear_bit(p->prio, array->bitmap); |
50 | dec_cpu_load(rq, p->se.load.weight); | ||
49 | } | 51 | } |
50 | 52 | ||
51 | /* | 53 | /* |