[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ea129d9-19cc-5f33-fc10-3e832679c5a2@intel.com>
Date: Thu, 13 Apr 2023 10:57:08 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: K Prateek Nayak <kprateek.nayak@....com>,
linux-kernel@...r.kernel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com, corbet@....net,
jgross@...e.com, andrew.cooper3@...rix.com, peterz@...radead.org,
Jason@...c4.com, thomas.lendacky@....com, puwen@...on.cn,
x86@...nel.org, linux-doc@...r.kernel.org,
oleksandr@...alenko.name, bagasdotme@...il.com
Subject: Re: [PATCH v2 2/2] x86/Documentation: Add documentation about cluster
On 4/13/23 10:29, K Prateek Nayak wrote:
> + - cluster_id:
> +
> + A per-CPU variable containing:
> +
> + - On Intel, the common upper bits of APIC ID of the list of CPUs sharing
> + the L2 Cache with lower bits set to 0.
> +
> + - On AMD and Hygon, with Topology Extension, the common upper bits of the
> + Extended APIC ID of the list of CPUs sharing the L2 Cache, left shifted
> + to remove trailing 0s.
I think this is too much detail for Documentation. We have the code if
anyone cares _this_ much.
Also, I'm perplexed by the "left shifted" comment. I don't see a lot of
left shifting in the patch. Am I just missing it?
Further, this makes it sound like all Intel CPUs have the cluster_id
populated. I'm also not sure that folks reading this will have any
worldly idea what "Topology Extension" is.
Why don't we just say that some CPUs don't have this info? That way we
don't need to spell out AMD vs. Intel or expect our users to go figuring
out of their CPU has "Topology Extension" or leaf 3 or wherever this
info is on Intel.
How about:
A per-CPU variable containing:
- Some upper bits extracted from the APIC ID. CPUs which have the
same value in these bits share an L2 and have the same cluster_id.
CPUs for which L2 cache information is unavailable will show 65535
as the cluster_id.
Powered by blists - more mailing lists