aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2008-09-23 15:33:45 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-23 16:23:17 +0200
commit57fdc26d4a734a3e00c6b2fc0e1e40ff8da4dc31 (patch)
tree912951e86391fc23f33981f88dce7cf374f136e1 /kernel/sched_fair.c
parent4653f803e6e0d970ffeac0efd2c01743eb6c5228 (diff)
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 <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c4
1 files changed, 2 insertions, 2 deletions
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):