Commit 7bd291ab authored by Peter Zijlstra's avatar Peter Zijlstra
Browse files

sched: Unify the SCHED_{SMT,CLUSTER,MC} Kconfig



Like many Kconfig symbols, SCHED_{SMT,CLUSTER,MC} are duplicated
across arch/*/Kconfig. Try and clean up a little.

Suggested-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarShrikanth Hegde <sshegde@linux.ibm.com>
Tested-by: Shrikanth Hegde <sshegde@linux.ibm.com> # powerpc
Link: https://lkml.kernel.org/r/20250826094358.GG3245006@noisy.programming.kicks-ass.net
parent 91c614f0
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
@@ -41,6 +41,44 @@ config HOTPLUG_SMT
config SMT_NUM_THREADS_DYNAMIC
	bool

config ARCH_SUPPORTS_SCHED_SMT
	bool

config ARCH_SUPPORTS_SCHED_CLUSTER
	bool

config ARCH_SUPPORTS_SCHED_MC
	bool

config SCHED_SMT
	bool "SMT (Hyperthreading) scheduler support"
	depends on ARCH_SUPPORTS_SCHED_SMT
	default y
	help
	  Improves the CPU scheduler's decision making when dealing with
	  MultiThreading at a cost of slightly increased overhead in some
	  places. If unsure say N here.

config SCHED_CLUSTER
	bool "Cluster scheduler support"
	depends on ARCH_SUPPORTS_SCHED_CLUSTER
	default y
	help
	  Cluster scheduler support improves the CPU scheduler's decision
	  making when dealing with machines that have clusters of CPUs.
	  Cluster usually means a couple of CPUs which are placed closely
	  by sharing mid-level caches, last-level cache tags or internal
	  busses.

config SCHED_MC
	bool "Multi-Core Cache (MC) scheduler support"
	depends on ARCH_SUPPORTS_SCHED_MC
	default y
	help
	  Multi-core scheduler support improves the CPU scheduler's decision
	  making when dealing with multi-core CPU chips at a cost of slightly
	  increased overhead in some places. If unsure say N here.

# Selected by HOTPLUG_CORE_SYNC_DEAD or HOTPLUG_CORE_SYNC_FULL
config HOTPLUG_CORE_SYNC
	bool
+2 −16
Original line number Diff line number Diff line
@@ -941,28 +941,14 @@ config IRQSTACKS
config ARM_CPU_TOPOLOGY
	bool "Support cpu topology definition"
	depends on SMP && CPU_V7
	select ARCH_SUPPORTS_SCHED_MC
	select ARCH_SUPPORTS_SCHED_SMT
	default y
	help
	  Support ARM cpu topology definition. The MPIDR register defines
	  affinity between processors which is then used to describe the cpu
	  topology of an ARM System.

config SCHED_MC
	bool "Multi-core scheduler support"
	depends on ARM_CPU_TOPOLOGY
	help
	  Multi-core scheduler support improves the CPU scheduler's decision
	  making when dealing with multi-core CPU chips at a cost of slightly
	  increased overhead in some places. If unsure say N here.

config SCHED_SMT
	bool "SMT scheduler support"
	depends on ARM_CPU_TOPOLOGY
	help
	  Improves the CPU scheduler's decision making when dealing with
	  MultiThreading at a cost of slightly increased overhead in some
	  places. If unsure say N here.

config HAVE_ARM_SCU
	bool
	help
+3 −23
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ config ARM64
	select ARCH_SUPPORTS_PER_VMA_LOCK
	select ARCH_SUPPORTS_HUGE_PFNMAP if TRANSPARENT_HUGEPAGE
	select ARCH_SUPPORTS_RT
	select ARCH_SUPPORTS_SCHED_SMT
	select ARCH_SUPPORTS_SCHED_CLUSTER
	select ARCH_SUPPORTS_SCHED_MC
	select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
	select ARCH_WANT_DEFAULT_BPF_JIT
@@ -1505,29 +1508,6 @@ config CPU_LITTLE_ENDIAN

endchoice

config SCHED_MC
	bool "Multi-core scheduler support"
	help
	  Multi-core scheduler support improves the CPU scheduler's decision
	  making when dealing with multi-core CPU chips at a cost of slightly
	  increased overhead in some places. If unsure say N here.

config SCHED_CLUSTER
	bool "Cluster scheduler support"
	help
	  Cluster scheduler support improves the CPU scheduler's decision
	  making when dealing with machines that have clusters of CPUs.
	  Cluster usually means a couple of CPUs which are placed closely
	  by sharing mid-level caches, last-level cache tags or internal
	  busses.

config SCHED_SMT
	bool "SMT scheduler support"
	help
	  Improves the CPU scheduler's decision making when dealing with
	  MultiThreading at a cost of slightly increased overhead in some
	  places. If unsure say N here.

config NR_CPUS
	int "Maximum number of CPUs (2-4096)"
	range 2 4096
+2 −17
Original line number Diff line number Diff line
@@ -70,6 +70,8 @@ config LOONGARCH
	select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
	select ARCH_SUPPORTS_NUMA_BALANCING
	select ARCH_SUPPORTS_RT
	select ARCH_SUPPORTS_SCHED_SMT if SMP
	select ARCH_SUPPORTS_SCHED_MC  if SMP
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_CMPXCHG_LOCKREF
	select ARCH_USE_MEMTEST
@@ -448,23 +450,6 @@ config EFI_STUB
	  This kernel feature allows the kernel to be loaded directly by
	  EFI firmware without the use of a bootloader.

config SCHED_SMT
	bool "SMT scheduler support"
	depends on SMP
	default y
	help
	  Improves scheduler's performance when there are multiple
	  threads in one physical core.

config SCHED_MC
	bool "Multi-core scheduler support"
	depends on SMP
	default y
	help
	  Multi-core scheduler support improves the CPU scheduler's decision
	  making when dealing with multi-core CPU chips at a cost of slightly
	  increased overhead in some places.

config SMP
	bool "Multi-Processing support"
	help
+2 −14
Original line number Diff line number Diff line
@@ -2223,7 +2223,7 @@ config MIPS_MT_SMP
	select SMP
	select SMP_UP
	select SYS_SUPPORTS_SMP
	select SYS_SUPPORTS_SCHED_SMT
	select ARCH_SUPPORTS_SCHED_SMT
	select MIPS_PERF_SHARED_TC_COUNTERS
	help
	  This is a kernel model which is known as SMVP. This is supported
@@ -2235,18 +2235,6 @@ config MIPS_MT_SMP
config MIPS_MT
	bool

config SCHED_SMT
	bool "SMT (multithreading) scheduler support"
	depends on SYS_SUPPORTS_SCHED_SMT
	default n
	help
	  SMT scheduler support improves the CPU scheduler's decision making
	  when dealing with MIPS MT enabled cores at a cost of slightly
	  increased overhead in some places. If unsure say N here.

config SYS_SUPPORTS_SCHED_SMT
	bool

config SYS_SUPPORTS_MULTITHREADING
	bool

@@ -2318,7 +2306,7 @@ config MIPS_CPS
	select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
	select SYNC_R4K if (CEVT_R4K || CSRC_R4K)
	select SYS_SUPPORTS_HOTPLUG_CPU
	select SYS_SUPPORTS_SCHED_SMT if CPU_MIPSR6
	select ARCH_SUPPORTS_SCHED_SMT if CPU_MIPSR6
	select SYS_SUPPORTS_SMP
	select WEAK_ORDERING
	select GENERIC_IRQ_MIGRATION if HOTPLUG_CPU
Loading