sched/deadline: Do not try to push tasks if pinned task switches to dl
[cascardo/linux.git] / kernel / sched / deadline.c
index 5285332..9d1e76a 100644 (file)
@@ -1622,7 +1622,8 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
 
        if (task_on_rq_queued(p) && rq->curr != p) {
 #ifdef CONFIG_SMP
-               if (rq->dl.overloaded && push_dl_task(rq) && rq != task_rq(p))
+               if (p->nr_cpus_allowed > 1 && rq->dl.overloaded &&
+                       push_dl_task(rq) && rq != task_rq(p))
                        /* Only reschedule if pushing failed */
                        check_resched = 0;
 #endif /* CONFIG_SMP */