Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100231
b: refs/heads/master
c: 42a3ac7
h: refs/heads/master
i:
  100229: d54679a
  100227: 95f1c33
  100223: 9482a58
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 27, 2008
1 parent fbc3d1d commit 4c7e183
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 408ed066b11cf9ee4536573b4269ee3613bd735e
refs/heads/master: 42a3ac7d5cee89849448b41b86faeb86f98e92f6
10 changes: 6 additions & 4 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,8 @@ load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,

list_for_each_entry(tg, &task_groups, list) {
struct cfs_rq *busiest_cfs_rq = tg->cfs_rq[busiest_cpu];
unsigned long busiest_h_load = busiest_cfs_rq->h_load;
unsigned long busiest_weight = busiest_cfs_rq->load.weight;
long rem_load, moved_load;

/*
Expand All @@ -1452,8 +1454,8 @@ load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
if (!busiest_cfs_rq->task_weight)
continue;

rem_load = rem_load_move * busiest_cfs_rq->load.weight;
rem_load /= busiest_cfs_rq->h_load + 1;
rem_load = rem_load_move * busiest_weight;
rem_load /= busiest_h_load + 1;

moved_load = __load_balance_fair(this_rq, this_cpu, busiest,
rem_load, sd, idle, all_pinned, this_best_prio,
Expand All @@ -1462,8 +1464,8 @@ load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
if (!moved_load)
continue;

moved_load *= busiest_cfs_rq->h_load;
moved_load /= busiest_cfs_rq->load.weight + 1;
moved_load *= busiest_h_load;
moved_load /= busiest_weight + 1;

rem_load_move -= moved_load;
if (rem_load_move < 0)
Expand Down

0 comments on commit 4c7e183

Please sign in to comment.