sched/rt: Optimize cpupri_find() on non-heterogenous systems
authorQais Yousef <qais.yousef@arm.com>
Mon, 2 Mar 2020 13:27:18 +0000 (13:27 +0000)
committerIngo Molnar <mingo@kernel.org>
Fri, 6 Mar 2020 11:57:27 +0000 (12:57 +0100)
commita1bd02e1f28b1939cac8c64072a0e578c3cbc345
treeb297a940228a68fadde6e97d77f078d3da1e8753
parentb28bc1e002c23ff8a4999c4a2fb1d4d412bc6f5e
sched/rt: Optimize cpupri_find() on non-heterogenous systems

By introducing a new cpupri_find_fitness() function that takes the
fitness_fn as an argument and only called when asym_system static key is
enabled.

cpupri_find() is now a wrapper function that calls cpupri_find_fitness()
passing NULL as a fitness_fn, hence disabling the logic that handles
fitness by default.

LINK: https://lore.kernel.org/lkml/c0772fca-0a4b-c88d-fdf2-5715fcf8447b@arm.com/
Reported-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Fixes: 804d402fb6f6 ("sched/rt: Make RT capacity-aware")
Link: https://lkml.kernel.org/r/20200302132721.8353-4-qais.yousef@arm.com
kernel/sched/cpupri.c
kernel/sched/cpupri.h
kernel/sched/rt.c