[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab3cfd71-57ba-44e6-8954-bf531294351b@amd.com>
Date: Mon, 1 Sep 2025 10:20:16 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>, Andrea Righi <arighi@...dia.com>
CC: 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>,
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>, Madhavan Srinivasan <maddy@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>, 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>, Peter Zijlstra
<peterz@...radead.org>
Subject: Re: [PATCH v7 4/8] powerpc/smp: Introduce CONFIG_SCHED_MC to guard MC
scheduling bits
On 8/26/2025 2:57 PM, Shrikanth Hegde wrote:
>> diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
>> index 86de4d0dd0aa..9a320d96e891 100644
>> --- a/arch/powerpc/include/asm/smp.h
>> +++ b/arch/powerpc/include/asm/smp.h
>> @@ -148,7 +148,9 @@ static inline const struct cpumask *cpu_smt_mask(int cpu)
>> }
>> #endif /* CONFIG_SCHED_SMT */
>> +#ifdef CONFIG_SCHED_MC
>> extern const struct cpumask *cpu_coregroup_mask(int cpu);
>> +#endif
>>
>
> Is ifdef necessary here?
This is gone in Peter's squash but I added it just to
remain consistent with cpu_smt_mask() above.
>
>> /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
>> *
>> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
>> index e623f2864dc4..7f79b853b221 100644
>> --- a/arch/powerpc/kernel/smp.c
>> +++ b/arch/powerpc/kernel/smp.c
>> @@ -1059,6 +1059,7 @@ static bool has_coregroup_support(void)
>> return coregroup_enabled;
>> }
>> +#ifdef CONFIG_SCHED_MC
>> const struct cpumask *cpu_coregroup_mask(int cpu)
>> {
>> if (has_coregroup_support())
>> @@ -1071,6 +1072,7 @@ static const struct cpumask *cpu_mc_mask(struct sched_domain_topology_level *tl,
>> {
>> return cpu_corgrp_mask(cpu);
>> }
>> +#endif
>>
>
> Previous patch says cpu_coregroup_mask is exported. Is it exported in any way to user or modules?
Just "exposed" to kernel/sched/topology.c bits :)
I don't think this is used by any generic module / exported to
userspace.
>
> Also i don't see similar gating in other archs. It maybe unnecessary.
>
>> static const struct cpumask *cpu_pkg_mask(struct sched_domain_topology_level *tl, int cpu)
>> {
>> @@ -1729,10 +1731,12 @@ static void __init build_sched_topology(void)
>> SDTL_INIT(shared_cache_mask, powerpc_shared_cache_flags, CACHE);
>> }
>> +#ifdef CONFIG_SCHED_MC
>> if (has_coregroup_support()) {
>> powerpc_topology[i++] =
>> SDTL_INIT(cpu_mc_mask, powerpc_shared_proc_flags, MC);
>> }
>> +#endif
>
> Just this gating should suffice IMO.
Ack. Your suggested diff to have CONFIG_SCHED_MC configurable on powerpc
looks good.
--
Thanks and Regards,
Prateek
Powered by blists - more mailing lists