aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched_rt.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index d10c80ebb67a..6a02b38ab653 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -960,18 +960,18 @@ select_task_rq_rt(struct rq *rq, struct task_struct *p, int sd_flag, int flags)
960 * runqueue. Otherwise simply start this RT task 960 * runqueue. Otherwise simply start this RT task
961 * on its current runqueue. 961 * on its current runqueue.
962 * 962 *
963 * We want to avoid overloading runqueues. Even if 963 * We want to avoid overloading runqueues. If the woken
964 * the RT task is of higher priority than the current RT task. 964 * task is a higher priority, then it will stay on this CPU
965 * RT tasks behave differently than other tasks. If 965 * and the lower prio task should be moved to another CPU.
966 * one gets preempted, we try to push it off to another queue. 966 * Even though this will probably make the lower prio task
967 * So trying to keep a preempting RT task on the same 967 * lose its cache, we do not want to bounce a higher task
968 * cache hot CPU will force the running RT task to 968 * around just because it gave up its CPU, perhaps for a
969 * a cold CPU. So we waste all the cache for the lower 969 * lock?
970 * RT task in hopes of saving some of a RT task 970 *
971 * that is just being woken and probably will have 971 * For equal prio tasks, we just let the scheduler sort it out.
972 * cold cache anyway.
973 */ 972 */
974 if (unlikely(rt_task(rq->curr)) && 973 if (unlikely(rt_task(rq->curr)) &&
974 rq->curr->prio < p->prio &&
975 (p->rt.nr_cpus_allowed > 1)) { 975 (p->rt.nr_cpus_allowed > 1)) {
976 int cpu = find_lowest_rq(p); 976 int cpu = find_lowest_rq(p);
977 977
@@ -1491,6 +1491,8 @@ static void task_woken_rt(struct rq *rq, struct task_struct *p)
1491 if (!task_running(rq, p) && 1491 if (!task_running(rq, p) &&
1492 !test_tsk_need_resched(rq->curr) && 1492 !test_tsk_need_resched(rq->curr) &&
1493 has_pushable_tasks(rq) && 1493 has_pushable_tasks(rq) &&
1494 rt_task(rq->curr) &&
1495 rq->curr->prio < p->prio &&
1494 p->rt.nr_cpus_allowed > 1) 1496 p->rt.nr_cpus_allowed > 1)
1495 push_rt_tasks(rq); 1497 push_rt_tasks(rq);
1496} 1498}