sched/fair: Make per-cpu cpumasks static
authorBing Huang <huangbing@kylinos.cn>
Fri, 22 Jul 2022 21:36:09 +0000 (05:36 +0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 3 Aug 2022 17:17:33 +0000 (19:17 +0200)
commit18c31c9711a90b48a77b78afb65012d9feec444c
treecf1a88e92a3bae24c4ff4791637db399caaeab78
parentd985ee9f449aafe45397ae1cf8887e9ac91d2f95
sched/fair: Make per-cpu cpumasks static

The load_balance_mask and select_rq_mask percpu variables are only used in
kernel/sched/fair.c.

Make them static and move their allocation into init_sched_fair_class().

Replace kzalloc_node() with zalloc_cpumask_var_node() to get rid of the
CONFIG_CPUMASK_OFFSTACK #ifdef and to align with per-cpu cpumask
allocation for RT (local_cpu_mask in init_sched_rt_class()) and DL
class (local_cpu_mask_dl in init_sched_dl_class()).

[ mingo: Tidied up changelog & touched up the code. ]

Signed-off-by: Bing Huang <huangbing@kylinos.cn>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20220722213609.3901-1-huangbing775@126.com
kernel/sched/core.c
kernel/sched/fair.c