[PATCH v7 4/8] powerpc/smp: Introduce CONFIG_SCHED_MC to guard MC scheduling bits
Geert Uytterhoeven
geert at linux-m68k.org
Tue Oct 14 23:37:11 AEDT 2025
Hoi Peter,
On Tue, 14 Oct 2025 at 11:42, Peter Zijlstra <peterz at infradead.org> wrote:
> On Tue, Oct 14, 2025 at 11:25:53AM +0200, Geert Uytterhoeven wrote:
> > On Thu, 28 Aug 2025 at 14:57, Peter Zijlstra <peterz at infradead.org> wrote:
> > > Now, when I look at unifying those config options (there's a metric ton
> > > of crap that's duplicated in the arch/*/Kconfig), I end up with something
> > > like the below.
> > >
> > > And while that isn't exact, it is the closest I could make it without
> > > making a giant mess of things.
> > >
> > > WDYT?
> >
> > Thanks for your patch, which is now commit 7bd291abe2da09f5 ("sched:
> > Unify the SCHED_{SMT,CLUSTER,MC} Kconfig") in v6.18-rc1.
> >
> > > --- 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
> >
> > This is now enabled by default everywhere, while it was disabled by
> > default on most architectures before...
>
> I'm not sure ARCH_SUPPORTS_SCHED_SMT counts as everywhere, but yes.
> A fair deal of the architectures had all this default yes, and I had to
> pick something. Can't make an omelette without breaking an egg and all
> that :/
OK.
> > > + 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.
> >
> > So it should default to n?
>
> That's just help text that got carried around. Many of the architectures
> that had default y still had this text on. I suppose we can change it if
> someone cares.
Please do so.
> > If it is really needed on some architectures or platforms, I guess
> > they can still select it explicitly?
>
> There were 4 cases:
>
> - arch doesn't support SMT
> - arch supports SMT and lets user pick, default Y
> - arch supports SMT and lets user pick, default N
> - arch mandates SMT
>
> Of those 3 are still possible, the one we lost is the default N case.
>
> Old configs that have =N will continue to have N. New configs might end
> up with Y.
>
> Why is this a problem?
While old .config files will see no changes, old defconfig files do
need updates.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
More information about the Linuxppc-dev
mailing list