sched: fixup buddy selection
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 23 Sep 2008 13:33:45 +0000 (15:33 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 23 Sep 2008 14:23:17 +0000 (16:23 +0200)
We should set the buddy even though we might already have the
TIF_RESCHED flag set.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c

index 0c59da7e31207a389dfb34251ce4de68c03b56af..e3f3c10f70336d700a12560ba3e8e586428a4ef7 100644 (file)
@@ -1249,6 +1249,8 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync)
        if (unlikely(se == pse))
                return;
 
+       cfs_rq_of(pse)->next = pse;
+
        /*
         * We can come here with TIF_NEED_RESCHED already set from new task
         * wake up path.
@@ -1256,8 +1258,6 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync)
        if (test_tsk_need_resched(curr))
                return;
 
-       cfs_rq_of(pse)->next = pse;
-
        /*
         * Batch tasks do not preempt (their preemption is driven by
         * the tick):