sched: do not hurt SCHED_BATCH on wakeup
authorIngo Molnar <mingo@elte.hu>
Tue, 18 Dec 2007 14:21:13 +0000 (15:21 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 18 Dec 2007 14:21:13 +0000 (15:21 +0100)
measurements by Yanmin Zhang have shown that SCHED_BATCH tasks benefit
if they run the same place_entity() logic as SCHED_OTHER tasks - so
uniformize behavior in this area.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c

index c33f0ce..da7c061 100644 (file)
@@ -511,8 +511,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) &&
-                               task_of(se)->policy != SCHED_BATCH)
+               if (sched_feat(NEW_FAIR_SLEEPERS) && entity_is_task(se))
                        vruntime -= sysctl_sched_latency;
 
                /* ensure we never gain time by being placed backwards. */