[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7137972e-bc7a-432c-94be-755ba9029d8c@linux.ibm.com>
Date: Thu, 28 Aug 2025 20:13:51 +0530
From: Shrikanth Hegde <sshegde@...ux.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>,
Christophe Leroy <christophe.leroy@...roup.eu>
Cc: K Prateek Nayak <kprateek.nayak@....com>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
linux-s390@...r.kernel.org,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
thomas.weissschuh@...utronix.de, Li Chen <chenl311@...natelecom.cn>,
Bibo Mao <maobibo@...ngson.cn>, Mete Durlu <meted@...ux.ibm.com>,
Tobias Huschle <huschle@...ux.ibm.com>,
Easwar Hariharan <easwar.hariharan@...ux.microsoft.com>,
Guo Weikang <guoweikang.kernel@...il.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Brian Gerst <brgerst@...il.com>,
Patryk Wlazlyn <patryk.wlazlyn@...ux.intel.com>,
Swapnil Sapkal <swapnil.sapkal@....com>,
"Yury Norov [NVIDIA]" <yury.norov@...il.com>,
Sudeep Holla <sudeep.holla@....com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Andrea Righi <arighi@...dia.com>,
Yicong Yang <yangyicong@...ilicon.com>,
Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>
Subject: Re: [PATCH v7 4/8] powerpc/smp: Introduce CONFIG_SCHED_MC to guard MC
scheduling bits
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
Powered by blists - more mailing lists