diff options
author | Kirill V Tkhai <tkhai@yandex.ru> | 2014-03-12 14:18:33 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-18 14:07:23 +0400 |
commit | 10447917551e0fffb8d1892d46e633c3e0a9c1ec (patch) | |
tree | b37e12c194a945b3fd9e573892a6131db30f29b8 | |
parent | 27e4f9d0012a9bb7011aade862f08679d2921ab0 (diff) | |
download | linux-10447917551e0fffb8d1892d46e633c3e0a9c1ec.tar.xz |
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>
-rw-r--r-- | kernel/sched/rt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index bd2267ad404f..1e4992eb5166 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) |