summaryrefslogtreecommitdiffstats
path: root/kernel/sched/rt.c
diff options
context:
space:
mode:
authorKirill V Tkhai <tkhai@yandex.ru>2014-03-12 06:18:33 -0400
committerIngo Molnar <mingo@kernel.org>2014-04-18 12:07:23 +0200
commit10447917551e0fffb8d1892d46e633c3e0a9c1ec (patch)
treeb37e12c194a945b3fd9e573892a6131db30f29b8 /kernel/sched/rt.c
parent27e4f9d0012a9bb7011aade862f08679d2921ab0 (diff)
sched/rt: Do not try to push tasks if pinned task switches to RT
Just switched pinned task is not able to be pushed. If the rq had had several RT tasks before they have already been considered as candidates to be pushed (or pulled). Signed-off-by: Kirill V Tkhai <tkhai@yandex.ru> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20140312061833.3a43aa64@gandalf.local.home Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r--kernel/sched/rt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index bd2267ad404..1e4992eb516 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1892,9 +1892,9 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p)
*/
if (p->on_rq && rq->curr != p) {
#ifdef CONFIG_SMP
- if (rq->rt.overloaded && push_rt_task(rq) &&
+ if (p->nr_cpus_allowed > 1 && rq->rt.overloaded &&
/* Don't resched if we changed runqueues */
- rq != task_rq(p))
+ push_rt_task(rq) && rq != task_rq(p))
check_resched = 0;
#endif /* CONFIG_SMP */
if (check_resched && p->prio < rq->curr->prio)