Skip to content

Commit

Permalink
sched: do not hurt SCHED_BATCH on wakeup
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Ingo Molnar committed Dec 18, 2007
1 parent 2bacec8 commit 6cbf1c1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 6cbf1c1

Please sign in to comment.