diff options
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index a1694441f8b7..0d197be3e3e9 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) | |||
1082 | for_each_sched_entity(se) { | 1082 | for_each_sched_entity(se) { |
1083 | #define D(n) (likely(n) ? (n) : 1) | 1083 | #define D(n) (likely(n) ? (n) : 1) |
1084 | 1084 | ||
1085 | long S, Srw, rw, s, sn; | 1085 | long S, rw, s, a, b; |
1086 | 1086 | ||
1087 | S = se->my_q->tg->shares; | 1087 | S = se->my_q->tg->shares; |
1088 | s = se->my_q->shares; | 1088 | s = se->my_q->shares; |
1089 | rw = se->my_q->load.weight; | 1089 | rw = se->my_q->load.weight; |
1090 | 1090 | ||
1091 | Srw = S * rw / D(s); | 1091 | a = S*(rw + wl); |
1092 | sn = S * (rw + wl) / D(Srw + wg); | 1092 | b = S*rw + s*wg; |
1093 | 1093 | ||
1094 | wl = sn - s; | 1094 | wl = s*(a-b)/D(b); |
1095 | wg = 0; | 1095 | wg = 0; |
1096 | #undef D | 1096 | #undef D |
1097 | } | 1097 | } |