From: "Zhang, Rui" <rui.zhang@intel.com>
To: "mingo@kernel.org" <mingo@kernel.org>, "bp@alien8.de" <bp@alien8.de>
Cc: "Hansen, Dave" <dave.hansen@intel.com>,
"ak@linux.intel.com" <ak@linux.intel.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"linux-perf-users@vger.kernel.org"
<linux-perf-users@vger.kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"kan.liang@linux.intel.com" <kan.liang@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] perf/x86/rapl: Add support for Intel Meteor Lake
Date: Fri, 6 Jan 2023 14:45:22 +0000 [thread overview]
Message-ID: <967b0ccdb8342d3405b415df7814ddcf49c28a17.camel@intel.com> (raw)
In-Reply-To: <Y7gG8R8ZRWTXYSGq@gmail.com>
On Fri, 2023-01-06 at 12:33 +0100, Ingo Molnar wrote:
> * Borislav Petkov <bp@alien8.de> 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.
Agreed.
>
> With 'non-architectural', per-model RAPL features we get very little
> of
> that...
Exactly.
The main purpose of the model list in RAPL PMU code and the intel_rapl
driver is to differentiate the model-specific behavior, say,
some models use standard energy unit retrieved from MSR
some models use a fixed energy unit for Dram Domain
and
some models use a fixed energy unit for Psys Domain
etc.
>
> 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...
Agreed.
> Likely won't be able to tell for sure until we see patches.
>
Yeah, let me cook up a RFC series later and we can continue with that.
thanks,
rui
next prev parent reply other threads:[~2023-01-06 14:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 14:58 [PATCH 1/2] perf/x86/rapl: Add support for Intel Meteor Lake Zhang Rui
2023-01-04 14:58 ` [PATCH 2/2] perf/x86/rapl: Add support for Intel Emerald Rapids Zhang Rui
2023-01-04 16:55 ` [PATCH 1/2] perf/x86/rapl: Add support for Intel Meteor Lake Dave Hansen
2023-01-05 6:54 ` Zhang, Rui
2023-01-05 9:55 ` Borislav Petkov
2023-01-06 6:05 ` Zhang, Rui
2023-01-06 10:14 ` Ingo Molnar
2023-01-06 10:39 ` Borislav Petkov
2023-01-06 10:56 ` Ingo Molnar
2023-01-06 11:11 ` Borislav Petkov
2023-01-06 11:33 ` Ingo Molnar
2023-01-06 14:45 ` Zhang, Rui [this message]
2023-01-06 14:38 ` Zhang, Rui
2023-01-06 14:49 ` Borislav Petkov
2023-01-06 14:50 ` Dave Hansen
2023-01-07 14:07 ` Zhang, Rui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=967b0ccdb8342d3405b415df7814ddcf49c28a17.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).