In 76854c7e8f3f4172fef091e78d88b3b751463ac6 ("sched: Use rt.nr_cpus_allowed to recover select_task_rq() cycles") an optimization was added to select_task_rq_rt() that immediately returns when p->nr_cpus_allowed == 1 at the beginning of the function. This makes the latter p->nr_cpus_allowed > 1 check redundant, which can now be removed.
Unified · Split
| @@ -1213,8 +1213,7 @@ select_task_rq_rt(struct task_struct *p, int sd_flag, int flags) · 1212 unmodified lines | |||
| 1213 | */ | 1213 | */ |
| 1214 | if (curr && unlikely(rt_task(curr)) && | 1214 | if (curr && unlikely(rt_task(curr)) && |
| 1215 | (curr->nr_cpus_allowed < 2 || | 1215 | (curr->nr_cpus_allowed < 2 || |
| 1216 | curr->prio <= p->prio) && | 1216 | curr->prio <= p->prio)) { |
| 1217 | (p->nr_cpus_allowed > 1)) { | ||
| 1218 | int target = find_lowest_rq(p); | 1217 | int target = find_lowest_rq(p); |
| 1219 | 1218 | ||
| 1220 | if (target != -1) | 1219 | if (target != -1) |