From: Srivatsa Vaddagiri Date: Thu, 31 Jan 2008 21:45:22 +0000 (+0100) Subject: sched: fix high wake up latencies with FAIR_USER_SCHED X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=296825cbe14d4c95ee9c41ca5824f7487bfb4d9d;p=linux-beck.git sched: fix high wake up latencies with FAIR_USER_SCHED The reason why we are getting better wakeup latencies for !FAIR_USER_SCHED is because of this snippet of code in place_entity(): if (!initial) { /* sleeps upto a single latency don't count. */ if (sched_feat(NEW_FAIR_SLEEPERS) && entity_is_task(se)) ^^^^^^^^^^^^^^^^^^ vruntime -= sysctl_sched_latency; /* ensure we never gain time by being placed backwards. */ vruntime = max_vruntime(se->vruntime, vruntime); } NEW_FAIR_SLEEPERS feature gives credit for sleeping only to tasks and not group-level entities. With the patch attached, I could see that wakeup latencies with FAIR_USER_SCHED are restored to the same level as !FAIR_USER_SCHED. Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 72e25c7a3a18..cf958aefac33 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -520,7 +520,7 @@ 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) && entity_is_task(se)) + if (sched_feat(NEW_FAIR_SLEEPERS)) vruntime -= sysctl_sched_latency; /* ensure we never gain time by being placed backwards. */