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>
This commit is contained in:
Peter Zijlstra
2008-06-27 13:41:22 +02:00
committed by Ingo Molnar
parent d3f40dbab9
commit a25b5aca87
2 changed files with 2 additions and 16 deletions

View File

@@ -1427,7 +1427,7 @@ load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
/*
* empty group
*/
if (!aggregate(tg, this_cpu)->task_weight)
if (!tg->cfs_rq[busiest_cpu]->task_weight)
continue;
rem_load = rem_load_move * aggregate(tg, this_cpu)->rq_weight;