]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sched: fix high wake up latencies with FAIR_USER_SCHED
authorSrivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Thu, 31 Jan 2008 21:45:22 +0000 (22:45 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 31 Jan 2008 21:45:22 +0000 (22:45 +0100)
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 <mingo@elte.hu>
kernel/sched_fair.c

index 72e25c7a3a186dc9830c206662dca4ad7d5892cb..cf958aefac33c182baab30ee9e2916156bf3fa83 100644 (file)
@@ -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. */