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 c33f0ceb3de9a64dc43538f7d9427c89a4b98eeb..da7c061e72062eacd6afee8a9870e9044ad0e2c5 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. */