sched/cpupri: Remove pri_to_cpu[CPUPRI_IDLE]
pri_to_cpu[CPUPRI_IDLE=0] isn't used since cpupri_set(..., newpri) is never called with newpri = MAX_PRIO. Even when cpupri was introduced with commit 6e0534f2 ("sched: use a 2-d bitmap for searching lowest-pri CPU"), only CPUPRI_INVALID (-1), an RT prio (1-99 (RT1-RT99)) or MAX_RT_PRIO (100) could be used for newprio in cpupri_set(..., newpri) -> convert_prio(newpri). MAX_RT_PRIO is used only in dec_rt_tasks() -> dec_rt_prio() -> dec_rt_prio_smp() -> cpupri_set() in case of !rt_rq->rt_nr_running. I.e. it is used for the case that the IDLE task is running as well. Commit 57785df5 ("sched: Fix task priority bug") removed code which did set the priority of the IDLE task to MAX_PRIO. Although this happened after the introduction of cpupri, it should never had an effect on the values used for cpupri_set(..., newpri). Remove CPUPRI_IDLE and adapt the cpupri implementation accordingly. This will save a useless loop with atomic_read's in cpupri_find_fitness() -> __cpupri_find(). Signed-off-by:Dietmar Eggemann <dietmar.eggemann@arm.com>
Loading
Please register or sign in to comment