sched: disable sleeper_fairness on SCHED_BATCH
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 15 Oct 2007 15:00:14 +0000 (17:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 15 Oct 2007 15:00:14 +0000 (17:00 +0200)
disable sleeper fairness for batch tasks - they are about
batch processing after all.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c

index 3ecbfd0902d88fc278f55d7c44e05388d1e88aa0..410b77aea216f959fb93f123df72b53a0ff1c288 100644 (file)
@@ -485,7 +485,9 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
                vruntime += sched_vslice_add(cfs_rq, se);
 
        if (!initial) {
-               if (sched_feat(NEW_FAIR_SLEEPERS))
+               struct task_struct *p = container_of(se, struct task_struct, se);
+
+               if (sched_feat(NEW_FAIR_SLEEPERS) && p->policy != SCHED_BATCH)
                        vruntime -= sysctl_sched_latency;
 
                vruntime = max_t(s64, vruntime, se->vruntime);