[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a506bb53-6e17-4a10-a870-50ce87a4ce06@csgroup.eu>
Date: Tue, 26 Aug 2025 10:11:40 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Peter Zijlstra <peterz@...radead.org>,
K Prateek Nayak <kprateek.nayak@....com>
Cc: 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 5/8] sched/topology: Unify tl_smt_mask() across core
and all arch
Le 26/08/2025 à 10:01, Peter Zijlstra a écrit :
>> diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
>> index 602508130c8a..d75fbb7d9667 100644
>> --- a/include/linux/sched/topology.h
>> +++ b/include/linux/sched/topology.h
>> @@ -37,7 +37,13 @@ static inline int cpu_smt_flags(void)
>> {
>> return SD_SHARE_CPUCAPACITY | SD_SHARE_LLC;
>> }
>> -#endif
>> +
>> +static const __maybe_unused
>> +struct cpumask *tl_smt_mask(struct sched_domain_topology_level *tl, int cpu)
>> +{
>> + return cpu_smt_mask(cpu);
>> +}
>> +#endif /* CONFIG_SCHED_SMT */
>
> Problem with that __maybe_unused is that you forgot inline.
>
> static inline const
> struct cpumask *tl_smt_mask(struct sched_domain_topology_level *tl, int cpu)
> {
> return cpu_smt_mask(cpu);
> }
>
> seems to make it happy.
>
But the function is referenced by SDTL_INIT() macro so there is no real
point in declaring it inline. Would be cleaner to have it defined in a C
file.
Christophe
Powered by blists - more mailing lists