[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240619015315.3ei5f6rovzdnxovo@desk>
Date: Tue, 18 Jun 2024 18:53:15 -0700
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: Brice Goglin <brice.goglin@...il.com>
Cc: 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,
daniel.sneddon@...ux.intel.com, tony.luck@...el.com,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
linux-perf-users@...r.kernel.org,
Josh Poimboeuf <jpoimboe@...nel.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
Andrew Cooper <andrew.cooper3@...rix.com>
Subject: Re: [PATCH 0/9] Add CPU-type to topology
On Tue, Jun 18, 2024 at 02:49:10PM +0200, Brice Goglin wrote:
> Le 17/06/2024 à 11:11, Pawan Gupta a écrit :
> > Hi,
> >
> > This series adds support for CPU-type (CPUID.1A.EAX[31-24] on Intel) to
> > differentiate between hybrid variants P+E, P-only, E-only that share the
> > same Family/Model/Stepping. One of the use case for CPU-type is the
> > affected CPU table for CPU vulnerabilities, which can now use the CPU-type
> > to filter the unaffected variants.
> >
> > * Patch 1 adds cpu-type to CPU topology structure and introduces
> > topology_cpu_type() to get the CPU-type.
> >
> > * Patch 2-4 replaces usages of get_this_hybrid_cpu_type() with
> > topology_cpu_type().
> >
> > * Patch 5-7 Updates CPU-matching infrastructure to use CPU-type.
> >
> > * Patch 8 cleans up the affected CPU list.
> >
> > * Patch 9 uses the CPU-type to exclude P-only parts from the RFDS affected
> > list.
>
>
> Hello
>
> Is there still a plan to expose this info in sysfs?
Sure, if it helps userspace.
> Userspace currently uses frequencies to guess which cores are E or P.
> Intel sent some patches several years ago [1], but they got abandoned
> nowhere as far as I know. There was also some discussion about using a
> "capacity" field like ARM does, but IIRC Intel didn't like the idea in
> the end.
There can be many ways to expose this information in sysfs. Like this ...
> [1] https://lkml.org/lkml/2020/10/2/1208
... exposes /sys/devices/system/cpu/types which, in hybrid parts, creates a
subdirectory for each type of CPU. Each subdirectory contains a CPU list
and a CPU map that user space can query.
The other way is to expose the CPU-type in a file:
/sys/devices/system/cpu/cpuN/type
that could return the CPU-type of the CPU N. Is there a preference?
Powered by blists - more mailing lists