[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-1158ddb55416855fd17abe3214298f736f00426a@git.kernel.org>
Date: Thu, 24 Jan 2013 12:36:40 -0800
From: tip-bot for Kirill Tkhai <tkhai@...dex.ru>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
rostedt@...dmis.org, peterz@...radead.org, tkhai@...dex.ru,
tglx@...utronix.de
Subject: [tip:sched/core] sched/rt:
Add reschedule check to switched_from_rt()
Commit-ID: 1158ddb55416855fd17abe3214298f736f00426a
Gitweb: http://git.kernel.org/tip/1158ddb55416855fd17abe3214298f736f00426a
Author: Kirill Tkhai <tkhai@...dex.ru>
AuthorDate: Fri, 23 Nov 2012 00:02:15 +0400
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 24 Jan 2013 17:14:30 +0100
sched/rt: Add reschedule check to switched_from_rt()
Reschedule rq->curr if the first RT task has just been
pulled to the rq.
Signed-off-by: Kirill V Tkhai <tkhai@...dex.ru>
Acked-by: Steven Rostedt <rostedt@...dmis.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Tkhai Kirill <tkhai@...dex.ru>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/118761353614535@web28f.yandex.ru
Signed-off-by: Ingo Molnar <mingo@...nel.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)
--
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