Commit 1158ddb55416855fd17abe3214298f736f00426a
Committed by
Ingo Molnar
1 parent
a59f4e079d
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff
kernel/sched/rt.c
... | ... | @@ -1889,8 +1889,11 @@ |
1889 | 1889 | * we may need to handle the pulling of RT tasks |
1890 | 1890 | * now. |
1891 | 1891 | */ |
1892 | - if (p->on_rq && !rq->rt.rt_nr_running) | |
1893 | - pull_rt_task(rq); | |
1892 | + if (!p->on_rq || rq->rt.rt_nr_running) | |
1893 | + return; | |
1894 | + | |
1895 | + if (pull_rt_task(rq)) | |
1896 | + resched_task(rq->curr); | |
1894 | 1897 | } |
1895 | 1898 | |
1896 | 1899 | void init_sched_rt_class(void) |