[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87lf36l0ua.mognet@arm.com>
Date: Wed, 06 Oct 2021 14:49:49 +0100
From: Valentin Schneider <valentin.schneider@....com>
To: Barry Song <21cnbao@...il.com>
Cc: Dietmar Eggemann <dietmar.eggemann@....com>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Aubrey Li <aubrey.li@...ux.intel.com>,
Borislav Petkov <bp@...en8.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Ben Segall <bsegall@...gle.com>,
Catalin Marinas <catalin.marinas@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Guodong Xu <guodong.xu@...aro.org>,
"H. Peter Anvin" <hpa@...or.com>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Juri Lelli <juri.lelli@...hat.com>,
"Cc\: Len Brown" <lenb@...nel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
LAK <linux-arm-kernel@...ts.infradead.org>,
Linuxarm <linuxarm@...wei.com>,
Mark Rutland <mark.rutland@....com>,
Mel Gorman <mgorman@...e.de>, msys.mizuma@...il.com,
"Zengtao \(B\)" <prime.zeng@...ilicon.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Steven Rostedt <rostedt@...dmis.org>,
Barry Song <song.bao.hua@...ilicon.com>,
Sudeep Holla <sudeep.holla@....com>,
Thomas Gleixner <tglx@...utronix.de>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Will Deacon <will@...nel.org>, x86 <x86@...nel.org>,
yangyicong <yangyicong@...wei.com>,
Tian Tao <tiantao6@...ilicon.com>
Subject: Re: [PATCH RESEND 1/3] topology: Represent clusters of CPUs within a die
On 06/10/21 09:43, Barry Song wrote:
>
> Hi Valentin,
> Yep, this is a very good question. I'd like change the code to:
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index 7cb31d959f33..fc0836f460fb 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -622,7 +622,8 @@ void update_siblings_masks(unsigned int cpuid)
> if (cpuid_topo->package_id != cpu_topo->package_id)
> continue;
>
> - if (cpuid_topo->cluster_id == cpu_topo->cluster_id) {
> + if (cpuid_topo->cluster_id == cpu_topo->cluster_id &&
> + cpuid_topo->cluster_id != -1) {
> cpumask_set_cpu(cpu, &cpuid_topo->cluster_sibling);
> cpumask_set_cpu(cpuid, &cpu_topo->cluster_sibling);
> }
>
> This should be consistent with Tim's patch3/3 for x86 in case
> id is BAD_APICID:
> static bool match_l2c(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
> {
> ...
> /* Do not match if we do not have a valid APICID for cpu: */
> if (per_cpu(cpu_l2c_id, cpu1) == BAD_APICID)
> return false;
> ...
> }
>
LGTM.
Powered by blists - more mailing lists