[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-8dd0de8be31b4b966d17750a0b10df2f575c91ac@git.kernel.org>
Date: Wed, 15 Jun 2011 09:50:25 GMT
From: tip-bot for Hillf Danton <dhillf@...il.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
dhillf@...il.com, rostedt@...dmis.org, yong.zhang0@...il.com,
tglx@...utronix.de, mingo@...e.hu
Subject: [tip:sched/urgent] sched: Fix need_resched() when checking peempt
Commit-ID: 8dd0de8be31b4b966d17750a0b10df2f575c91ac
Gitweb: http://git.kernel.org/tip/8dd0de8be31b4b966d17750a0b10df2f575c91ac
Author: Hillf Danton <dhillf@...il.com>
AuthorDate: Tue, 14 Jun 2011 18:36:24 -0400
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 15 Jun 2011 09:50:32 +0200
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 <dhillf@...il.com>
Reviewed-by: Yong Zhang <yong.zhang0@...il.com>
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
Link: http://lkml.kernel.org/r/20110614223657.450239027@goodmis.org
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
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 88725c9..9b8d5dc 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
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists