linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest'
@ 2025-03-25 22:20 kernel test robot
  2025-03-26  9:35 ` Oleg Nesterov
  2025-03-30 13:49 ` [PATCH] sched/isolation: forbid CONFIG_CPU_ISOLATION without CONFIG_SMP Oleg Nesterov
  0 siblings, 2 replies; 6+ messages in thread
From: kernel test robot @ 2025-03-25 22:20 UTC (permalink / raw)
  To: Oleg Nesterov
  Cc: oe-kbuild-all, linux-kernel, Ingo Molnar, Thomas Gleixner,
	Phil Auld

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@intel.com/config)
compiler: sh4-linux-gcc (GCC) 10.5.0
reproduce: (https://download.01.org/0day-ci/archive/20250326/202503260646.lrUqD3j5-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503260646.lrUqD3j5-lkp@intel.com/

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	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest'
  2025-03-25 22:20 kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest' kernel test robot
@ 2025-03-26  9:35 ` Oleg Nesterov
  2025-03-27 21:35   ` Ingo Molnar
  2025-03-30 13:49 ` [PATCH] sched/isolation: forbid CONFIG_CPU_ISOLATION without CONFIG_SMP Oleg Nesterov
  1 sibling, 1 reply; 6+ messages in thread
From: Oleg Nesterov @ 2025-03-26  9:35 UTC (permalink / raw)
  To: kernel test robot, Yoshinori Sato, Rich Felker,
	John Paul Adrian Glaubitz
  Cc: oe-kbuild-all, linux-kernel, Ingo Molnar, Thomas Gleixner,
	Phil Auld

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@intel.com/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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest'
  2025-03-26  9:35 ` Oleg Nesterov
@ 2025-03-27 21:35   ` Ingo Molnar
  0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2025-03-27 21:35 UTC (permalink / raw)
  To: Oleg Nesterov
  Cc: kernel test robot, Yoshinori Sato, Rich Felker,
	John Paul Adrian Glaubitz, oe-kbuild-all, linux-kernel,
	Thomas Gleixner, Phil Auld


* Oleg Nesterov <oleg@redhat.com> 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@intel.com/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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] sched/isolation: forbid CONFIG_CPU_ISOLATION without CONFIG_SMP
  2025-03-25 22:20 kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest' kernel test robot
  2025-03-26  9:35 ` Oleg Nesterov
@ 2025-03-30 13:49 ` Oleg Nesterov
  2025-03-30 19:23   ` [tip: sched/urgent] sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP tip-bot2 for Oleg Nesterov
  2025-04-03 11:26   ` tip-bot2 for Oleg Nesterov
  1 sibling, 2 replies; 6+ messages in thread
From: Oleg Nesterov @ 2025-03-30 13:49 UTC (permalink / raw)
  To: kernel test robot, Ingo Molnar
  Cc: oe-kbuild-all, linux-kernel, Thomas Gleixner, Phil Auld

kernel/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.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503260646.lrUqD3j5-lkp@intel.com/
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 init/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index 681f38ee68db..ab9b0c2c3d52 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -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
-- 
2.25.1.362.g51ebf55



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [tip: sched/urgent] sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
  2025-03-30 13:49 ` [PATCH] sched/isolation: forbid CONFIG_CPU_ISOLATION without CONFIG_SMP Oleg Nesterov
@ 2025-03-30 19:23   ` tip-bot2 for Oleg Nesterov
  2025-04-03 11:26   ` tip-bot2 for Oleg Nesterov
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot2 for Oleg Nesterov @ 2025-03-30 19:23 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: kernel test robot, Oleg Nesterov, Ingo Molnar, x86, linux-kernel

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 <oleg@redhat.com>
AuthorDate:    Sun, 30 Mar 2025 15:49:55 +02:00
Committer:     Ingo Molnar <mingo@kernel.org>
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.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250330134955.GA7910@redhat.com

Closes: https://lore.kernel.org/oe-kbuild-all/202503260646.lrUqD3j5-lkp@intel.com/
---
 init/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index 681f38e..ab9b0c2 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [tip: sched/urgent] sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
  2025-03-30 13:49 ` [PATCH] sched/isolation: forbid CONFIG_CPU_ISOLATION without CONFIG_SMP Oleg Nesterov
  2025-03-30 19:23   ` [tip: sched/urgent] sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP tip-bot2 for Oleg Nesterov
@ 2025-04-03 11:26   ` tip-bot2 for Oleg Nesterov
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot2 for Oleg Nesterov @ 2025-04-03 11:26 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: kernel test robot, Oleg Nesterov, Ingo Molnar, x86, linux-kernel

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 <oleg@redhat.com>
AuthorDate:    Sun, 30 Mar 2025 15:49:55 +02:00
Committer:     Ingo Molnar <mingo@kernel.org>
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.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250330134955.GA7910@redhat.com

Closes: https://lore.kernel.org/oe-kbuild-all/202503260646.lrUqD3j5-lkp@intel.com/
---
 init/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index 681f38e..ab9b0c2 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-04-03 11:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-25 22:20 kernel/sched/isolation.c:50: undefined reference to `sched_numa_find_closest' kernel test robot
2025-03-26  9:35 ` Oleg Nesterov
2025-03-27 21:35   ` Ingo Molnar
2025-03-30 13:49 ` [PATCH] sched/isolation: forbid CONFIG_CPU_ISOLATION without CONFIG_SMP Oleg Nesterov
2025-03-30 19:23   ` [tip: sched/urgent] sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP tip-bot2 for Oleg Nesterov
2025-04-03 11:26   ` tip-bot2 for Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).