Skip to content

Commit

Permalink
sched: do not wakeup-preempt with SCHED_BATCH tasks
Browse files Browse the repository at this point in the history
do not wakeup-preempt with SCHED_BATCH tasks, their preemption
is batched too, driven by the tick.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Oct 15, 2007
1 parent fb7dde3 commit 91c234b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,12 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
resched_task(curr);
return;
}
/*
* Batch tasks do not preempt (their preemption is driven by
* the tick):
*/
if (unlikely(p->policy == SCHED_BATCH))
return;

if (sched_feat(WAKEUP_PREEMPT)) {
while (!is_same_group(se, pse)) {
Expand Down

0 comments on commit 91c234b

Please sign in to comment.