[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e926a154-0f4e-49b2-aefa-1e778530c34c@csgroup.eu>
Date: Tue, 26 Aug 2025 07:14:36 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: 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>, Peter Zijlstra <peterz@...radead.org>,
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
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>,
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 6/8] sched/topology: Unify tl_cls_mask() across core
and x86
Le 26/08/2025 à 06:13, K Prateek Nayak a écrit :
> Unify the tl_cls_mask() used by both the scheduler core and x86.
> No functional changes intended.
>
> Signed-off-by: K Prateek Nayak <kprateek.nayak@....com>
> ---
> arch/x86/kernel/smpboot.c | 4 ----
> include/linux/sched/topology.h | 8 +++++++-
> kernel/sched/topology.c | 7 -------
> 3 files changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 03ff6270966a..81a40d777d65 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -470,10 +470,6 @@ static int x86_cluster_flags(void)
> {
> return cpu_cluster_flags() | x86_sched_itmt_flags();
> }
> -static const struct cpumask *tl_cls_mask(struct sched_domain_topology_level *tl, int cpu)
> -{
> - return cpu_clustergroup_mask(cpu);
> -}
> #endif
>
> #ifdef CONFIG_SCHED_MC
> diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
> index d75fbb7d9667..e54501cc8e47 100644
> --- a/include/linux/sched/topology.h
> +++ b/include/linux/sched/topology.h
> @@ -50,7 +50,13 @@ static inline int cpu_cluster_flags(void)
> {
> return SD_CLUSTER | SD_SHARE_LLC;
> }
> -#endif
> +
> +static const __maybe_unused
Same as previous patch, don't hide dust under the carpet, if you need
__maybe_unused it means there is a problem in the construct.
> +struct cpumask *tl_cls_mask(struct sched_domain_topology_level *tl, int cpu)
> +{
> + return cpu_clustergroup_mask(cpu);
> +}
> +#endif /* CONFIG_SCHED_CLUSTER */
>
> #ifdef CONFIG_SCHED_MC
> static inline int cpu_core_flags(void)
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index 92165fe56a2d..4530cbad41e1 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -1724,13 +1724,6 @@ sd_init(struct sched_domain_topology_level *tl,
> return sd;
> }
>
> -#ifdef CONFIG_SCHED_CLUSTER
> -static const struct cpumask *tl_cls_mask(struct sched_domain_topology_level *tl, int cpu)
> -{
> - return cpu_clustergroup_mask(cpu);
> -}
> -#endif
> -
> #ifdef CONFIG_SCHED_MC
> static const struct cpumask *tl_mc_mask(struct sched_domain_topology_level *tl, int cpu)
> {
Powered by blists - more mailing lists