From: Josef Bacik <jba...@fb.com> We have no idea how long ago the process went to sleep. It could have just gone to sleep, in which case we would essentially be counting the load of the process twice in the previous effective load. Since the history presumably already exists in the previous cpu load don't bother adding it's effective load again.
Signed-off-by: Josef Bacik <jba...@fb.com> --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d958634..ee8dced 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5689,7 +5689,7 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p, this_eff_load *= this_load + effective_load(tg, this_cpu, weight, weight); - prev_eff_load *= load + effective_load(tg, prev_cpu, 0, weight); + prev_eff_load *= load; } balanced = this_eff_load <= prev_eff_load; -- 2.9.3