summaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index a1694441f8b..0d197be3e3e 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1082,16 +1082,16 @@ static unsigned long effective_load(struct task_group *tg, long wl, int cpu)
for_each_sched_entity(se) {
#define D(n) (likely(n) ? (n) : 1)
- long S, Srw, rw, s, sn;
+ long S, rw, s, a, b;
S = se->my_q->tg->shares;
s = se->my_q->shares;
rw = se->my_q->load.weight;
- Srw = S * rw / D(s);
- sn = S * (rw + wl) / D(Srw + wg);
+ a = S*(rw + wl);
+ b = S*rw + s*wg;
- wl = sn - s;
+ wl = s*(a-b)/D(b);
wg = 0;
#undef D
}