From: Peter Zijlstra Date: Tue, 23 Sep 2008 13:33:45 +0000 (+0200) Subject: sched: fixup buddy selection X-Git-Tag: v2.6.28-rc1~725^2~2^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=57fdc26d4a734a3e00c6b2fc0e1e40ff8da4dc31;p=linux-2.6-omap-h63xx.git sched: fixup buddy selection We should set the buddy even though we might already have the TIF_RESCHED flag set. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 0c59da7e312..e3f3c10f703 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -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):