diff options
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r-- | kernel/sched/rt.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index f71bcbe1a00c..dbdabd76f192 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c | |||
@@ -1592,7 +1592,7 @@ pick_next_task_rt(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) | |||
1592 | return p; | 1592 | return p; |
1593 | } | 1593 | } |
1594 | 1594 | ||
1595 | static void put_prev_task_rt(struct rq *rq, struct task_struct *p) | 1595 | static void put_prev_task_rt(struct rq *rq, struct task_struct *p, struct rq_flags *rf) |
1596 | { | 1596 | { |
1597 | update_curr_rt(rq); | 1597 | update_curr_rt(rq); |
1598 | 1598 | ||
@@ -1604,6 +1604,18 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p) | |||
1604 | */ | 1604 | */ |
1605 | if (on_rt_rq(&p->rt) && p->nr_cpus_allowed > 1) | 1605 | if (on_rt_rq(&p->rt) && p->nr_cpus_allowed > 1) |
1606 | enqueue_pushable_task(rq, p); | 1606 | enqueue_pushable_task(rq, p); |
1607 | |||
1608 | if (rf && !on_rt_rq(&p->rt) && need_pull_rt_task(rq, p)) { | ||
1609 | /* | ||
1610 | * This is OK, because current is on_cpu, which avoids it being | ||
1611 | * picked for load-balance and preemption/IRQs are still | ||
1612 | * disabled avoiding further scheduler activity on it and we've | ||
1613 | * not yet started the picking loop. | ||
1614 | */ | ||
1615 | rq_unpin_lock(rq, rf); | ||
1616 | pull_rt_task(rq); | ||
1617 | rq_repin_lock(rq, rf); | ||
1618 | } | ||
1607 | } | 1619 | } |
1608 | 1620 | ||
1609 | #ifdef CONFIG_SMP | 1621 | #ifdef CONFIG_SMP |