sched/fair: Fix fixed point arithmetic width for shares and effective load
[cascardo/linux.git] / kernel / sched / fair.c
index 8fb4d19..786ef94 100644 (file)
@@ -5017,9 +5017,9 @@ static long effective_load(struct task_group *tg, int cpu, long wl, long wg)
                 * wl = S * s'_i; see (2)
                 */
                if (W > 0 && w < W)
-                       wl = (w * (long)tg->shares) / W;
+                       wl = (w * (long)scale_load_down(tg->shares)) / W;
                else
-                       wl = tg->shares;
+                       wl = scale_load_down(tg->shares);
 
                /*
                 * Per the above, wl is the new se->load.weight value; since