Skip to content

Commit

Permalink
sched: disable sleeper_fairness on SCHED_BATCH
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Oct 15, 2007
1 parent 810e95c commit 8ca0e14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8ca0e14

Please sign in to comment.