sched/cpupri: Remap CPUPRI_NORMAL to MAX_RT_PRIO-1
authorPeter Zijlstra <peterz@infradead.org>
Wed, 14 Oct 2020 19:06:49 +0000 (21:06 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 29 Oct 2020 10:00:30 +0000 (11:00 +0100)
commit934fc3314b39e16a89fc4d5d0d5cbfe71dcbe7b1
treecde90f2929580bce91b9dcdda8651265e5a38606
parent1b08782ce31f612d98e11ccccf3e3df9a147a67d
sched/cpupri: Remap CPUPRI_NORMAL to MAX_RT_PRIO-1

This makes the mapping continuous and frees up 100 for other usage.

Prev 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

New mapping:

p->rt_priority   p->prio   newpri   cpupri

                               -1       -1 (CPUPRI_INVALID)

                               99        0 (CPUPRI_NORMAL)

             1        98       98        1
           ...
            49        50       50       49
            50        49       49       50
           ...
            99         0        0       99

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
kernel/sched/cpupri.c
kernel/sched/rt.c