From 91c234b4e3419c786cac2d5b7a7b96443e512e3a Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 15 Oct 2007 17:00:18 +0200 Subject: sched: do not wakeup-preempt with SCHED_BATCH tasks do not wakeup-preempt with SCHED_BATCH tasks, their preemption is batched too, driven by the tick. Signed-off-by: Ingo Molnar --- kernel/sched_fair.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'kernel/sched_fair.c') diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index ec1592eb8d08..c240b72b4e62 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -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)) { -- cgit v1.2.3