Re: kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest'
From: Ingo Molnar
Date: Thu Mar 27 2025 - 17:35:52 EST
* Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> On 03/26, kernel test robot wrote:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 2d09a9449ecd9a2b9fdac62408c12ee20b6307d2
> > commit: 5097cbcb38e6e0d2627c9dde1985e91d2c9f880e sched/isolation: Prevent boot crash when the boot CPU is nohz_full
> > date: 11 months ago
> > config: sh-randconfig-r132-20250326 (https://download.01.org/0day-ci/archive/20250326/202503260646.lrUqD3j5-lkp@xxxxxxxxx/config)
> ...
> > >> kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest'
>
> kernel/sched/isolation.c makes no sense without CONFIG_SMP, but
>
> config CPU_ISOLATION
> bool "CPU isolation"
> depends on SMP || COMPILE_TEST
>
> and .config above has CONFIG_COMPILE_TEST but not CONFIG_SMP.
>
> It also has CONFIG_NUMA, it doesn't depend on CONFIG_SMP in
> arch/sh/mm/Kconfig, so isolation.c can't use the dummy version
> of sched_numa_find_closest() in kernel/sched/sched.h, and
> kernel/sched/build_utility.c doesn't include topology.c without
> CONFIG_SMP.
>
> Perhaps we can should simply remove this "|| COMPILE_TEST" ?
>
> Oleg.
>
> --- x/init/Kconfig
> +++ x/init/Kconfig
> @@ -709,7 +709,7 @@ endmenu # "CPU/Task time and stats accou
>
> config CPU_ISOLATION
> bool "CPU isolation"
> - depends on SMP || COMPILE_TEST
> + depends on SMP
> default y
> help
> Make sure that CPUs running critical tasks are not disturbed by
Yeah, please send a patch with a SOB.
Thanks,
Ingo