aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_rt.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r--kernel/sched_rt.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index bac1061cea2f..fbec5a58ff10 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -805,20 +805,15 @@ static int select_task_rq_rt(struct task_struct *p, int sync)
805 805
806static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p) 806static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
807{ 807{
808 cpumask_var_t mask;
809
810 if (rq->curr->rt.nr_cpus_allowed == 1) 808 if (rq->curr->rt.nr_cpus_allowed == 1)
811 return; 809 return;
812 810
813 if (!alloc_cpumask_var(&mask, GFP_ATOMIC))
814 return;
815
816 if (p->rt.nr_cpus_allowed != 1 811 if (p->rt.nr_cpus_allowed != 1
817 && cpupri_find(&rq->rd->cpupri, p, mask)) 812 && cpupri_find(&rq->rd->cpupri, p, NULL))
818 goto free; 813 return;
819 814
820 if (!cpupri_find(&rq->rd->cpupri, rq->curr, mask)) 815 if (!cpupri_find(&rq->rd->cpupri, rq->curr, NULL))
821 goto free; 816 return;
822 817
823 /* 818 /*
824 * There appears to be other cpus that can accept 819 * There appears to be other cpus that can accept
@@ -827,8 +822,6 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
827 */ 822 */
828 requeue_task_rt(rq, p, 1); 823 requeue_task_rt(rq, p, 1);
829 resched_task(rq->curr); 824 resched_task(rq->curr);
830free:
831 free_cpumask_var(mask);
832} 825}
833 826
834#endif /* CONFIG_SMP */ 827#endif /* CONFIG_SMP */