[PATCH v7 4/8] powerpc/smp: Introduce CONFIG_SCHED_MC to guard MC scheduling bits
Shrikanth Hegde
sshegde at linux.ibm.com
Fri Aug 29 00:43:51 AEST 2025
Hi Peter.
Looking at this,
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=sched/core&id=9d710c5b2bb37cedf5f09ce988884fb5795e1a76
>
> WDYT?
>
> ---
> Kconfig | 38 ++++++++++++++++++++++++++++++++++++++
> arm/Kconfig | 18 ++----------------
> arm64/Kconfig | 26 +++-----------------------
> loongarch/Kconfig | 19 ++-----------------
> mips/Kconfig | 16 ++--------------
> parisc/Kconfig | 9 +--------
> powerpc/Kconfig | 15 +++------------
> riscv/Kconfig | 9 +--------
> s390/Kconfig | 8 ++------
> sparc/Kconfig | 20 ++------------------
> x86/Kconfig | 27 ++++-----------------------
> 11 files changed, 60 insertions(+), 145 deletions(-)
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -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
...
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -170,6 +170,9 @@ config PPC
> select ARCH_STACKWALK
> select ARCH_SUPPORTS_ATOMIC_RMW
> select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC_BOOK3S || PPC_8xx
> + select ARCH_SUPPORTS_SCHED_SMT if PPC64 && SMP
> + select ARCH_SUPPORTS_SCHED_MC if PPC64 && SMP
> + select SCHED_MC if ARCH_SUPPORTS_SCHED_MC
Wondering if this SCHED_MC is necessary here? shouldn't it be set by arch/Kconfig?
nit: Also, can we have so they are still sorted?
select ARCH_SUPPORTS_SCHED_MC if PPC64 && SMP
select ARCH_SUPPORTS_SCHED_SMT if PPC64 && SMP
> select ARCH_USE_BUILTIN_BSWAP
> select ARCH_USE_CMPXCHG_LOCKREF if PPC64
> select ARCH_USE_MEMTEST
> @@ -963,18 +966,6 @@ config PPC_PROT_SAO_LPAR
> config PPC_COPRO_BASE
> bool
>
> -config SCHED_SMT
> - bool "SMT (Hyperthreading) scheduler support"
> - depends on PPC64 && SMP
> - help
> - SMT scheduler support improves the CPU scheduler's decision making
> - when dealing with POWER5 cpus at a cost of slightly increased
> - overhead in some places. If unsure say N here.
> -
> -config SCHED_MC
> - def_bool y
> - depends on PPC64 && SMP
> -
> config PPC_DENORMALISATION
> bool "PowerPC denormalisation exception handling"
> depends on PPC_BOOK3S_64
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -72,6 +72,7 @@ config RISCV
> select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
> select ARCH_SUPPORTS_RT
> select ARCH_SUPPORTS_SHADOW_CALL_STACK if HAVE_SHADOW_CALL_STACK
> + select ARCH_SUPPORTS_SCHED_MC if SMP
> select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
> select ARCH_USE_MEMTEST
> select ARCH_USE_QUEUED_RWLOCKS
> @@ -453,14 +454,6 @@ config SMP
>
> If you don't know what to do here, say N.
>
> -config SCHED_MC
> - bool "Multi-core scheduler support"
> - depends on SMP
> - 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 NR_CPUS
> int "Maximum number of CPUs (2-512)"
> depends on SMP
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -547,15 +547,11 @@ config NODES_SHIFT
> depends on NUMA
> default "1"
>
> -config SCHED_SMT
> - def_bool n
> -
> -config SCHED_MC
> - def_bool n
> -
> config SCHED_TOPOLOGY
> def_bool y
> prompt "Topology scheduler support"
> + select ARCH_SUPPORTS_SCHED_SMT
> + select ARCH_SUPPORTS_SCHED_MC
> select SCHED_SMT
> select SCHED_MC
Same here. Above two are needed?
> help
> --- a/arch/sparc/Kconfig
> +++ b/arch/sparc/Kconfig
> @@ -110,6 +110,8 @@ config SPARC64
> select HAVE_SETUP_PER_CPU_AREA
> select NEED_PER_CPU_EMBED_FIRST_CHUNK
> select NEED_PER_CPU_PAGE_FIRST_CHUNK
> + select ARCH_SUPPORTS_SCHED_SMT if SMP
> + select ARCH_SUPPORTS_SCHED_MC if SMP
>
> config ARCH_PROC_KCORE_TEXT
> def_bool y
> @@ -288,24 +290,6 @@ if SPARC64 || COMPILE_TEST
> source "kernel/power/Kconfig"
> endif
>
> -config SCHED_SMT
> - bool "SMT (Hyperthreading) scheduler support"
> - depends on SPARC64 && SMP
> - default y
> - help
> - SMT scheduler support improves the CPU scheduler's decision making
> - when dealing with SPARC cpus at a cost of slightly increased overhead
> - in some places. If unsure say N here.
> -
> -config SCHED_MC
> - bool "Multi-core scheduler support"
> - depends on SPARC64 && 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. If unsure say N here.
> -
> config CMDLINE_BOOL
> bool "Default bootloader kernel arguments"
> depends on SPARC64
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -330,6 +330,10 @@ config X86
> imply IMA_SECURE_AND_OR_TRUSTED_BOOT if EFI
> select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
> select ARCH_SUPPORTS_PT_RECLAIM if X86_64
> + select ARCH_SUPPORTS_SCHED_SMT if SMP
> + select SCHED_SMT if SMP
Is this SCHED_SMT needed here?
> + select ARCH_SUPPORTS_SCHED_CLUSTER if SMP
> + select ARCH_SUPPORTS_SCHED_MC if SMP
>
> config INSTRUCTION_DECODER
> def_bool y
> @@ -1036,29 +1040,6 @@ config NR_CPUS
> This is purely to save memory: each supported CPU adds about 8KB
> to the kernel image.
>
> -config SCHED_CLUSTER
> - bool "Cluster scheduler support"
> - depends on SMP
> - 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_SMT
> - def_bool y if SMP
> -
> -config SCHED_MC
> - def_bool y
> - prompt "Multi-core scheduler support"
> - depends on SMP
> - 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_MC_PRIO
> bool "CPU core priorities scheduler support"
> depends on SCHED_MC
More information about the Linuxppc-dev
mailing list