Re: [PATCH] x86/topo: Map vendor CPU types to generic Linux such types
Pawan Gupta <[email protected]>
| Newsgroups | gmane.linux.acpi.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <bpncabyd5x7q2niuopingb4ztimoxz7ldw3mha7yntyq5mbsyb@5qjrfihupvym> |
On Wed, Jul 22, 2026 at 12:51:05PM -0700, Borislav Petkov wrote: > On Wed, Jul 22, 2026 at 12:22:11PM -0700, Pawan Gupta wrote: > > Unless I am misreading, TOPO_CPU_TYPE_ANY is introduced in this patch. > > X86_*_ANY in x86_match_cpu() are much needed wildcards, I dont really > > understand why x86_topology_cpu_type needs to carry a wildcard. It should > > reflect the true state, PERFORMANCE, EFFICIENCY or UNKNOWN. > > > > Between ANY and UNKNOWN, I would prefer UNKNOWN when CPU did not report a > > type. > > Because X86_CPU_TYPE_ANY is already there and it is 0 and TOPO_CPU_TYPE_ANY is > supposed to be the same and mirror it. This is exactly what I don't understand. For a wildcard X86_CPU_TYPE_ANY that matches TOPO_CPU_TYPE_*, do we really need TOPO_CPU_TYPE_ANY for matching to work? > Did you even read my mail where I explain that we don't do multiple things in > one patch? Yes, but my main concern is about addition of TOPO_CPU_TYPE_ANY. If we don't add TOPO_CPU_TYPE_ANY, second patch will not be needed. Sorry if I am mis-interpreting things. > > Ya. If need be, a mask of each possible cpu_type can be built for > > dispatching work selectively. > > Instead of doing the completely sensible thing and keeping a per-CPU type? My earlier comment was unnecessary, and putting us off-track here. Please ignore this part. (Just to clarify what I meant: For dispatching work to all P-cores in your example scenario with something like on_each_cpu_mask() we would need a mask of all P-cores. Such a mask can be built/cached using the per-CPU type information).