[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250901083507.GD4067720@noisy.programming.kicks-ass.net>
Date: Mon, 1 Sep 2025 10:35:07 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: Christophe Leroy <christophe.leroy@...roup.eu>,
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
On Thu, Aug 28, 2025 at 08:13:51PM +0530, Shrikanth Hegde wrote:
> > --- 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?
Ah, so without this SCHED_MC becomes a user selectable option, with this
it is an always on option (for ppc64) -- no user prompt.
That is, this is the only way I found to have similar semantics to this:
> > -config SCHED_MC
> > - def_bool y
> > - depends on PPC64 && SMP
> > -
Which is also not a user selectable option.
> 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
Sure, let me flip them. I need to prod that that patch anyway, built
robot still ain'ted happy.
> > --- 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?
Same issue; previously neither were user selectable symbols. By only
selecting the ARCH_SUPPORTS_$FOO variants, the $FOO options become user
selectable. By then explicitly selecting $FOO as well, that user option
is taken away again.
> > --- 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?
Same again...
> > + 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.
See how SCHED_SMT is not a user option for x86.
Powered by blists - more mailing lists