Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100224
b: refs/heads/master
c: a25b5ac
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 27, 2008
1 parent 9482a58 commit 339907f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3f40dbab954d83383b6a516582d5c09cc216dcc
refs/heads/master: a25b5aca8740ea99d5e18dfc71235a52b685dcf7
16 changes: 1 addition & 15 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 *
Expand Down Expand Up @@ -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;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 339907f

Please sign in to comment.