From: Ingo Molnar Date: Fri, 14 Mar 2008 21:16:08 +0000 (+0100) Subject: sched: fix fair sleepers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e22ecef1d2658ba54ed7d3fdb5d60829fb434c23;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git sched: fix fair sleepers Fair sleepers need to scale their latency target down by runqueue weight. Otherwise busy systems will gain ever larger sleep bonus. Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 31c4a2988b64..31aa1b9fa762 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -528,8 +528,10 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) if (!initial) { /* sleeps upto a single latency don't count. */ - if (sched_feat(NEW_FAIR_SLEEPERS)) - vruntime -= sysctl_sched_latency; + if (sched_feat(NEW_FAIR_SLEEPERS)) { + vruntime -= calc_delta_fair(sysctl_sched_latency, + &cfs_rq->load); + } /* ensure we never gain time by being placed backwards. */ vruntime = max_vruntime(se->vruntime, vruntime);