|
@@ -971,7 +971,8 @@ select_task_rq_rt(struct rq *rq, struct task_struct *p, int sd_flag, int flags)
|
|
|
* For equal prio tasks, we just let the scheduler sort it out.
|
|
|
*/
|
|
|
if (unlikely(rt_task(rq->curr)) &&
|
|
|
- rq->curr->prio < p->prio &&
|
|
|
+ (rq->curr->rt.nr_cpus_allowed < 2 ||
|
|
|
+ rq->curr->prio < p->prio) &&
|
|
|
(p->rt.nr_cpus_allowed > 1)) {
|
|
|
int cpu = find_lowest_rq(p);
|
|
|
|
|
@@ -1491,9 +1492,10 @@ static void task_woken_rt(struct rq *rq, struct task_struct *p)
|
|
|
if (!task_running(rq, p) &&
|
|
|
!test_tsk_need_resched(rq->curr) &&
|
|
|
has_pushable_tasks(rq) &&
|
|
|
+ p->rt.nr_cpus_allowed > 1 &&
|
|
|
rt_task(rq->curr) &&
|
|
|
- rq->curr->prio < p->prio &&
|
|
|
- p->rt.nr_cpus_allowed > 1)
|
|
|
+ (rq->curr->rt.nr_cpus_allowed < 2 ||
|
|
|
+ rq->curr->prio < p->prio))
|
|
|
push_rt_tasks(rq);
|
|
|
}
|
|
|
|