aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/rt.c
diff options
context:
space:
mode:
authorDietmar Eggemann <dietmar.eggemann@arm.com>2020-09-22 10:39:34 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-10-29 11:00:29 +0100
commit1b08782ce31f612d98e11ccccf3e3df9a147a67d (patch)
tree99eee9c6748240acdc77f19085265916d3c89ab1 /kernel/sched/rt.c
parentsched/cpupri: Remove pri_to_cpu[CPUPRI_IDLE] (diff)
downloadlinux-dev-1b08782ce31f612d98e11ccccf3e3df9a147a67d.tar.xz
linux-dev-1b08782ce31f612d98e11ccccf3e3df9a147a67d.zip
sched/cpupri: Remove pri_to_cpu[1]
pri_to_cpu[1] isn't used since cpupri_set(..., newpri) is never called with newpri = 99. The valid RT priorities RT1..RT99 (p->rt_priority = [1..99]) map into cpupri (idx of pri_to_cpu[]) = [2..100] Current mapping: p->rt_priority p->prio newpri cpupri -1 -1 (CPUPRI_INVALID) 100 0 (CPUPRI_NORMAL) 1 98 98 2 ... 49 50 50 50 50 49 49 51 ... 99 0 0 100 So cpupri = 1 isn't used. Reduce the size of pri_to_cpu[] by 1 and adapt the cpupri implementation accordingly. This will save a useless for loop with an atomic_read in cpupri_find_fitness() calling __cpupri_find(). New mapping: p->rt_priority p->prio newpri cpupri -1 -1 (CPUPRI_INVALID) 100 0 (CPUPRI_NORMAL) 1 98 98 1 ... 49 50 50 49 50 49 49 50 ... 99 0 0 99 Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20200922083934.19275-3-dietmar.eggemann@arm.com
Diffstat (limited to 'kernel/sched/rt.c')
0 files changed, 0 insertions, 0 deletions