Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110728
b: refs/heads/master
c: 940959e
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 23, 2008
1 parent 652a7c1 commit dfc1b7b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 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: 63e5c39859a41591662466028c4d1281c033c05a
refs/heads/master: 940959e93949e839c14f8ddc3b9b0e34a2ab6e29
27 changes: 14 additions & 13 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,6 @@ static long effective_load(struct task_group *tg, int cpu,
long wl, long wg)
{
struct sched_entity *se = tg->se[cpu];
long more_w;

if (!tg->parent)
return wl;
Expand All @@ -1039,18 +1038,17 @@ static long effective_load(struct task_group *tg, int cpu,
if (!wl && sched_feat(ASYM_EFF_LOAD))
return wl;

/*
* Instead of using this increment, also add the difference
* between when the shares were last updated and now.
*/
more_w = se->my_q->load.weight - se->my_q->rq_weight;
wl += more_w;
wg += more_w;

for_each_sched_entity(se) {
#define D(n) (likely(n) ? (n) : 1)

long S, rw, s, a, b;
long more_w;

/*
* Instead of using this increment, also add the difference
* between when the shares were last updated and now.
*/
more_w = se->my_q->load.weight - se->my_q->rq_weight;
wl += more_w;
wg += more_w;

S = se->my_q->tg->shares;
s = se->my_q->shares;
Expand All @@ -1059,7 +1057,11 @@ static long effective_load(struct task_group *tg, int cpu,
a = S*(rw + wl);
b = S*rw + s*wg;

wl = s*(a-b)/D(b);
wl = s*(a-b);

if (likely(b))
wl /= b;

/*
* Assume the group is already running and will
* thus already be accounted for in the weight.
Expand All @@ -1068,7 +1070,6 @@ static long effective_load(struct task_group *tg, int cpu,
* alter the group weight.
*/
wg = 0;
#undef D
}

return wl;
Expand Down

0 comments on commit dfc1b7b

Please sign in to comment.