Skip to content

Commit

Permalink
sched: fix fair preempt check
Browse files Browse the repository at this point in the history
Impact: fix cross-class preemption

Inter-class wakeup preemptions should go on class order.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Nov 5, 2008
1 parent f4b6755 commit d95f98d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,9 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync)
return;
}

if (unlikely(p->sched_class != &fair_sched_class))
return;

if (unlikely(se == pse))
return;

Expand Down

0 comments on commit d95f98d

Please sign in to comment.