aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-10-15 11:00:18 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-15 11:00:18 -0400
commit91c234b4e3419c786cac2d5b7a7b96443e512e3a (patch)
tree4d8d04c685147d8f05d5687550f1ad0862258d2f
parentfb7dde37ece82e13de383afd7042c45df67a9d17 (diff)
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 <mingo@elte.hu>
-rw-r--r--kernel/sched_fair.c6
1 files changed, 6 insertions, 0 deletions
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)
828 resched_task(curr); 828 resched_task(curr);
829 return; 829 return;
830 } 830 }
831 /*
832 * Batch tasks do not preempt (their preemption is driven by
833 * the tick):
834 */
835 if (unlikely(p->policy == SCHED_BATCH))
836 return;
831 837
832 if (sched_feat(WAKEUP_PREEMPT)) { 838 if (sched_feat(WAKEUP_PREEMPT)) {
833 while (!is_same_group(se, pse)) { 839 while (!is_same_group(se, pse)) {