kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest'
kernel test robot
build bottree: 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/[email protected]/config) compiler: sh4-linux-gcc (GCC) 10.5.0 reproduce: (https://download.01.org/0day-ci/archive/20250326/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
sh4-linux-ld: kernel/sched/build_utility.o: in function `housekeeping_any_cpu':
>> kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest'
vim +50 kernel/sched/isolation.c
38
39 int housekeeping_any_cpu(enum hk_type type)
40 {
41 int cpu;
42
43 if (static_branch_unlikely(&housekeeping_overridden)) {
44 if (housekeeping.flags & BIT(type)) {
45 cpu = sched_numa_find_closest(housekeeping.cpumasks[type], smp_processor_id());
46 if (cpu < nr_cpu_ids)
47 return cpu;
48
49 cpu = cpumask_any_and(housekeeping.cpumasks[type], cpu_online_mask);
> 50 if (likely(cpu < nr_cpu_ids))
51 return cpu;
52 /*
53 * Unless we have another problem this can only happen
54 * at boot time before start_secondary() brings the 1st
55 * housekeeping CPU up.
56 */
57 WARN_ON_ONCE(system_state == SYSTEM_RUNNING ||
58 type != HK_TYPE_TIMER);
59 }
60 }
61 return smp_processor_id();
62 }
63 EXPORT_SYMBOL_GPL(housekeeping_any_cpu);
64 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 6 lines · kernel test robot
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/[email protected]/config)
...
Quoted 1 line
Quoted 1 line
Quoted 1 line
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.
init/Kconfig +1 -1
@@ -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
Quoted 31 lines · Oleg Nesterov
Quoted 6 lines · kernel test robot
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/[email protected]/config)...
Quoted 1 line
Quoted 1 line
Quoted 1 line
kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest'
kernel/sched/isolation.cmakes no sense withoutCONFIG_SMP, butconfig CPU_ISOLATION bool "CPU isolation" depends on SMP || COMPILE_TESTand .config above has
CONFIG_COMPILE_TESTbut notCONFIG_SMP.It also has
CONFIG_NUMA, it doesn't depend onCONFIG_SMPinarch/sh/mm/Kconfig, soisolation.ccan't use the dummy version ofsched_numa_find_closest()inkernel/sched/sched.h, andkernel/sched/build_utility.cdoesn't includetopology.cwithoutCONFIG_SMP.Perhaps we can should simply remove this "||
COMPILE_TEST" ?Oleg.
init/Kconfig endmenu # "CPU/Task time and stats accou · line 715
Quoted 8 lines
init/Kconfig +1
-1@@ -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
PATCH 1/1 sched/isolation: forbid CONFIG_CPU_ISOLATION without CONFIG_SMP
In reply to kernel test robotkernel/sched/isolation.c obviously makes no sense without CONFIG_SMP, but
config CPU_ISOLATION bool "CPU isolation" depends on SMP || COMPILE_TEST
we currently have allows to create the pointless .config's which cause the build failures.
--- init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
init/Kconfig +1 -1
@@ -709,7 +709,7 @@ endmenu # "CPU/Task time and stats accounting" 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
Signature · 1 line
2.25.1.362.g51ebf55
[tip: sched/urgent] sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
The following commit has been merged into the sched/urgent branch of tip:
The following commit has been merged into the sched/urgent branch of tip:
Commit-ID: 9939188c730d68b8b6b5210b7770021656181730 Gitweb: https://git.kernel.org/tip/9939188c730d68b8b6b5210b7770021656181730 Author: Oleg Nesterov <[email protected]> AuthorDate: Sun, 30 Mar 2025 15:49:55 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Sun, 30 Mar 2025 21:08:05 +02:00
sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
kernel/sched/isolation.c obviously makes no sense without CONFIG_SMP, but the Kconfig entry we have right now:
config CPU_ISOLATION bool "CPU isolation" depends on SMP || COMPILE_TEST
allows the creation of pointless .config's which cause build failures.
--- init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
init/Kconfig +1 -1
@@ -709,7 +709,7 @@ endmenu # "CPU/Task time and stats accounting" 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
[tip: sched/urgent] sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
In reply to Oleg NesterovThe following commit has been merged into the sched/urgent branch of tip:
The following commit has been merged into the sched/urgent branch of tip:
Commit-ID: 975776841e689dd8ba36df9fa72ac3eca3c2957a Gitweb: https://git.kernel.org/tip/975776841e689dd8ba36df9fa72ac3eca3c2957a Author: Oleg Nesterov <[email protected]> AuthorDate: Sun, 30 Mar 2025 15:49:55 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Thu, 03 Apr 2025 13:08:04 +02:00
sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
kernel/sched/isolation.c obviously makes no sense without CONFIG_SMP, but the Kconfig entry we have right now:
config CPU_ISOLATION bool "CPU isolation" depends on SMP || COMPILE_TEST
allows the creation of pointless .config's which cause build failures.
--- init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
init/Kconfig +1 -1
@@ -709,7 +709,7 @@ endmenu # "CPU/Task time and stats accounting" 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