public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]sched/rt.c: Add reschedule to switched_from_rt()
@ 2012-11-22 20:02 Kirill Tkhai
  2012-11-28  3:45 ` Steven Rostedt
  2013-01-24 20:36 ` [tip:sched/core] sched/rt: Add reschedule check " tip-bot for Kirill Tkhai
  0 siblings, 2 replies; 3+ messages in thread
From: Kirill Tkhai @ 2012-11-22 20:02 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org
  Cc: Steven Rostedt, Ingo Molnar, Peter Zijlstra, Tkhai Kirill

Reschedule rq->curr if the first RT task has just been
pulled to the rq.

Signed-off-by: Kirill V Tkhai <tkhai@yandex.ru>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Ingo Molnar <mingo@kernel.org>
CC: Peter Zijlstra <peterz@infradead.org>
---
 kernel/sched/rt.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 418feb0..29bda5b 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1889,8 +1889,11 @@ static void switched_from_rt(struct rq *rq, struct task_struct *p)
 	 * we may need to handle the pulling of RT tasks
 	 * now.
 	 */
-	if (p->on_rq && !rq->rt.rt_nr_running)
-		pull_rt_task(rq);
+	if (!p->on_rq || rq->rt.rt_nr_running)
+		return;
+
+	if (pull_rt_task(rq))
+		resched_task(rq->curr);
 }
 
 void init_sched_rt_class(void)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-24 20:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22 20:02 [PATCH]sched/rt.c: Add reschedule to switched_from_rt() Kirill Tkhai
2012-11-28  3:45 ` Steven Rostedt
2013-01-24 20:36 ` [tip:sched/core] sched/rt: Add reschedule check " tip-bot for Kirill Tkhai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox