diff options
| -rw-r--r-- | kernel/sched_rt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 6a02b38ab653..baef30f08405 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
| @@ -971,7 +971,8 @@ select_task_rq_rt(struct rq *rq, struct task_struct *p, int sd_flag, int flags) | |||
| 971 | * For equal prio tasks, we just let the scheduler sort it out. | 971 | * For equal prio tasks, we just let the scheduler sort it out. |
| 972 | */ | 972 | */ |
| 973 | if (unlikely(rt_task(rq->curr)) && | 973 | if (unlikely(rt_task(rq->curr)) && |
| 974 | rq->curr->prio < p->prio && | 974 | (rq->curr->rt.nr_cpus_allowed < 2 || |
| 975 | rq->curr->prio < p->prio) && | ||
| 975 | (p->rt.nr_cpus_allowed > 1)) { | 976 | (p->rt.nr_cpus_allowed > 1)) { |
| 976 | int cpu = find_lowest_rq(p); | 977 | int cpu = find_lowest_rq(p); |
| 977 | 978 | ||
| @@ -1491,9 +1492,10 @@ static void task_woken_rt(struct rq *rq, struct task_struct *p) | |||
| 1491 | if (!task_running(rq, p) && | 1492 | if (!task_running(rq, p) && |
| 1492 | !test_tsk_need_resched(rq->curr) && | 1493 | !test_tsk_need_resched(rq->curr) && |
| 1493 | has_pushable_tasks(rq) && | 1494 | has_pushable_tasks(rq) && |
| 1495 | p->rt.nr_cpus_allowed > 1 && | ||
| 1494 | rt_task(rq->curr) && | 1496 | rt_task(rq->curr) && |
| 1495 | rq->curr->prio < p->prio && | 1497 | (rq->curr->rt.nr_cpus_allowed < 2 || |
| 1496 | p->rt.nr_cpus_allowed > 1) | 1498 | rq->curr->prio < p->prio)) |
| 1497 | push_rt_tasks(rq); | 1499 | push_rt_tasks(rq); |
| 1498 | } | 1500 | } |
| 1499 | 1501 | ||
