diff options
author | Kirill Tkhai <tkhai@yandex.ru> | 2012-11-23 00:02:15 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-01-24 17:14:30 +0100 |
commit | 1158ddb55416855fd17abe3214298f736f00426a (patch) | |
tree | 493bc349d3e2b33b6c851ff72b2b15b7cc683ee8 /kernel/sched | |
parent | a59f4e079d19464eebb9b06513a1d4f55fdae5ba (diff) | |
download | op-kernel-dev-1158ddb55416855fd17abe3214298f736f00426a.zip op-kernel-dev-1158ddb55416855fd17abe3214298f736f00426a.tar.gz |
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@yandex.ru>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tkhai Kirill <tkhai@yandex.ru>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/118761353614535@web28f.yandex.ru
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/rt.c | 7 |
1 files 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) |