Skip to content

Commit

Permalink
sched: fixup buddy selection
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 23, 2008
1 parent 4653f80 commit 57fdc26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,15 +1249,15 @@ 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.
*/
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):
Expand Down

0 comments on commit 57fdc26

Please sign in to comment.