Re: [PATCH 1/2] perf/x86/rapl: Add support for Intel Meteor Lake
From: Ingo Molnar
Date: Fri Jan 06 2023 - 06:33:44 EST
* Borislav Petkov <bp@xxxxxxxxx> wrote:
> On Fri, Jan 06, 2023 at 11:56:18AM +0100, Ingo Molnar wrote:
> > It's a trade-off in any case: there's a point where quirk flags or even
> > feature flags become harder to read and harder to maintain than cleanly
> > separated per model driver functions.
>
> Yeah, no, singular: a synthetic feature *flag*: X86_FEATURE_RAPL.
>
> cpu/intel.c can set it and driver can test it.
>
> Everything else inside the driver.
>
> Until Intel can get their act together and actually do a CPUID bit like AMD. :-P
>
> But when you think about it, whether the model matching happens in the driver or
> in cpu/intel.c doesn't matter a whole lot.
>
> All that matters is, they should finally give it a CPUID bit.
The other thing that matters here are the RAPL *incompatibilities* between
model variants, which are significant AFAICS.
With a CPUID we get a kind of semi-compatible hardware interface with well
defined semantics & expansion.
With 'non-architectural', per-model RAPL features we get very little of
that...
Which is why it's a trade-off that is hard to judge in advance: maybe we
can simplify the code via a synthethic CPUID[s], maybe it will just be
another zoo of per-model feature flags...
Likely won't be able to tell for sure until we see patches.
Thanks,
Ingo