diff options
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 299d012b4394..9bf0d2a73045 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -948,20 +948,15 @@ static int select_task_rq_rt(struct task_struct *p, int sync) | |||
948 | 948 | ||
949 | static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p) | 949 | static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p) |
950 | { | 950 | { |
951 | cpumask_var_t mask; | ||
952 | |||
953 | if (rq->curr->rt.nr_cpus_allowed == 1) | 951 | if (rq->curr->rt.nr_cpus_allowed == 1) |
954 | return; | 952 | return; |
955 | 953 | ||
956 | if (!alloc_cpumask_var(&mask, GFP_ATOMIC)) | ||
957 | return; | ||
958 | |||
959 | if (p->rt.nr_cpus_allowed != 1 | 954 | if (p->rt.nr_cpus_allowed != 1 |
960 | && cpupri_find(&rq->rd->cpupri, p, mask)) | 955 | && cpupri_find(&rq->rd->cpupri, p, NULL)) |
961 | goto free; | 956 | return; |
962 | 957 | ||
963 | if (!cpupri_find(&rq->rd->cpupri, rq->curr, mask)) | 958 | if (!cpupri_find(&rq->rd->cpupri, rq->curr, NULL)) |
964 | goto free; | 959 | return; |
965 | 960 | ||
966 | /* | 961 | /* |
967 | * There appears to be other cpus that can accept | 962 | * There appears to be other cpus that can accept |
@@ -970,8 +965,6 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p) | |||
970 | */ | 965 | */ |
971 | requeue_task_rt(rq, p, 1); | 966 | requeue_task_rt(rq, p, 1); |
972 | resched_task(rq->curr); | 967 | resched_task(rq->curr); |
973 | free: | ||
974 | free_cpumask_var(mask); | ||
975 | } | 968 | } |
976 | 969 | ||
977 | #endif /* CONFIG_SMP */ | 970 | #endif /* CONFIG_SMP */ |
@@ -1598,7 +1591,7 @@ static inline void init_sched_rt_class(void) | |||
1598 | unsigned int i; | 1591 | unsigned int i; |
1599 | 1592 | ||
1600 | for_each_possible_cpu(i) | 1593 | for_each_possible_cpu(i) |
1601 | alloc_cpumask_var_node(&per_cpu(local_cpu_mask, i), | 1594 | zalloc_cpumask_var_node(&per_cpu(local_cpu_mask, i), |
1602 | GFP_KERNEL, cpu_to_node(i)); | 1595 | GFP_KERNEL, cpu_to_node(i)); |
1603 | } | 1596 | } |
1604 | #endif /* CONFIG_SMP */ | 1597 | #endif /* CONFIG_SMP */ |