[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e3607ed0-bdf5-4fef-8731-b81fae649312@arm.com>
Date: Fri, 28 Feb 2025 12:10:15 +0100
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Yicong Yang <yangyicong@...wei.com>, catalin.marinas@....com,
will@...nel.org, sudeep.holla@....com, tglx@...utronix.de,
peterz@...radead.org, mpe@...erman.id.au,
linux-arm-kernel@...ts.infradead.org, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, pierre.gondois@....com
Cc: linuxppc-dev@...ts.ozlabs.org, x86@...nel.org,
linux-kernel@...r.kernel.org, morten.rasmussen@....com, msuchanek@...e.de,
gregkh@...uxfoundation.org, rafael@...nel.org, jonathan.cameron@...wei.com,
prime.zeng@...ilicon.com, linuxarm@...wei.com, yangyicong@...ilicon.com,
xuwei5@...wei.com, guohanjun@...wei.com, sshegde@...ux.ibm.com
Subject: Re: [PATCH v11 1/4] cpu/SMT: Provide a default
topology_is_primary_thread()
On 18/02/2025 15:10, Yicong Yang wrote:
> From: Yicong Yang <yangyicong@...ilicon.com>
[...]
> diff --git a/include/linux/topology.h b/include/linux/topology.h
> index 52f5850730b3..b3aba443c4eb 100644
> --- a/include/linux/topology.h
> +++ b/include/linux/topology.h
> @@ -240,6 +240,28 @@ static inline const struct cpumask *cpu_smt_mask(int cpu)
> }
> #endif
>
> +#ifndef topology_is_primary_thread
> +
> +#define topology_is_primary_thread topology_is_primary_thread
> +
> +static inline bool topology_is_primary_thread(unsigned int cpu)
> +{
> + /*
> + * On SMT hotplug the primary thread of the SMT won't be disabled.
> + * Architectures do have a special primary thread (e.g. x86) need
> + * to override this function. Otherwise just make the first thread
> + * in the SMT as the primary thread.
> + *
> + * The sibling cpumask of an offline CPU contains always the CPU
> + * itself for architectures using CONFIG_GENERIC_ARCH_TOPOLOGY.
> + * Other architectures should use this depend on their own
> + * situation.
This sentence is hard to get. Do you want to say that other
architectures (CONFIG_GENERIC_ARCH_TOPOLOGY or
!CONFIG_GENERIC_ARCH_TOPOLOGY) have to check whether they can use this
default implementation or have to override it?
[...]
Powered by blists - more mailing lists