diff options
author | Hillf Danton <[email protected]> | 2011-06-14 18:36:24 -0400 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2011-06-15 09:50:32 +0200 |
commit | 8dd0de8be31b4b966d17750a0b10df2f575c91ac (patch) | |
tree | 991b9dddf6ef092f94bba5af7609c13c8d7b113c | |
parent | 2c53b436a30867eb6b47dd7bab23ba638d1fb0d2 (diff) |
sched: Fix need_resched() when checking peempt
The RT preempt check tests the wrong task if NEED_RESCHED is
set. It currently checks the local CPU task. It is supposed to
check the task that is running on the runqueue we are about to
wake another task on.
Signed-off-by: Hillf Danton <[email protected]>
Reviewed-by: Yong Zhang <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | kernel/sched_rt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 88725c939e0b..9b8d5dce946e 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@ -1096,7 +1096,7 @@ static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p, int flag * to move current somewhere else, making room for our non-migratable * task. */ - if (p->prio == rq->curr->prio && !need_resched()) + if (p->prio == rq->curr->prio && !test_tsk_need_resched(rq->curr)) check_preempt_equal_prio(rq, p); #endif } |