summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2008-06-27 13:41:22 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-27 14:31:35 +0200
commita25b5aca8740ea99d5e18dfc71235a52b685dcf7 (patch)
tree834bcfd9a51f840cc10693348ecffc99ce69550d /kernel/sched.c
parentd3f40dbab954d83383b6a516582d5c09cc216dcc (diff)
downloadop-kernel-dev-a25b5aca8740ea99d5e18dfc71235a52b685dcf7.zip
op-kernel-dev-a25b5aca8740ea99d5e18dfc71235a52b685dcf7.tar.gz
sched: no need to aggregate task_weight
We only need to know the task_weight of the busiest rq - nothing to do if there are no tasks there. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Cc: Mike Galbraith <efault@gmx.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 28229c5..716cfc8 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -433,12 +433,6 @@ struct cfs_rq {
* The sum of all runqueue weights within this span.
*/
unsigned long rq_weight;
-
- /*
- * Weight contributed by tasks; this is the part we can
- * influence by moving tasks around.
- */
- unsigned long task_weight;
} aggregate;
#endif
#endif
@@ -1473,10 +1467,6 @@ static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd);
* rq_weight:
* Direct sum of all the cpu's their rq weight, e.g. A would get 3 while
* B would get 2.
- *
- * task_weight:
- * Part of the rq_weight contributed by tasks; all groups except B would
- * get 1, B gets 2.
*/
static inline struct aggregate_struct *
@@ -1524,16 +1514,12 @@ static void
aggregate_group_weight(struct task_group *tg, int cpu, struct sched_domain *sd)
{
unsigned long rq_weight = 0;
- unsigned long task_weight = 0;
int i;
- for_each_cpu_mask(i, sd->span) {
+ for_each_cpu_mask(i, sd->span)
rq_weight += tg->cfs_rq[i]->load.weight;
- task_weight += tg->cfs_rq[i]->task_weight;
- }
aggregate(tg, cpu)->rq_weight = rq_weight;
- aggregate(tg, cpu)->task_weight = task_weight;
}
/*
OpenPOWER on IntegriCloud