[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y7f0eRI++oXvWlrM@gmail.com>
Date: Fri, 6 Jan 2023 11:14:17 +0100
From: Ingo Molnar <mingo@...nel.org>
To: "Zhang, Rui" <rui.zhang@...el.com>
Cc: "bp@...en8.de" <bp@...en8.de>,
"Hansen, Dave" <dave.hansen@...el.com>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"x86@...nel.org" <x86@...nel.org>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"kan.liang@...ux.intel.com" <kan.liang@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] perf/x86/rapl: Add support for Intel Meteor Lake
* Zhang, Rui <rui.zhang@...el.com> wrote:
> On Thu, 2023-01-05 at 10:55 +0100, Borislav Petkov wrote:
> > On Thu, Jan 05, 2023 at 06:54:31AM +0000, Zhang, Rui wrote:
> > > I thought of this before and got some ideas related.
> > > Say, instead of maintaining the model list in a series of drivers,
> > > can
> > > we have something similar to "cpu_feature" instead?
> >
> > Yes, you can define a synthetic X86_FEATURE flag and set it for each
> > CPU model which supports the feature in arch/x86/kernel/cpu/intel.c so
> > that at least all the model matching gunk is kept where it belongs, in
> > the CPU init code and the other code simply tests that flag.
>
> Great, thanks for this info.
>
> But I still have a question.
>
> Take RAPL feature for example, the feature is not architectural, although
> 80% of the platforms may follow the same behavior, but there are still
> cases that behave differently. And so far, there are 8 different
> behaviors based on different models.
>
> In this case, can we have several different flags for the RAPL feature
> and make the RAPL driver probe on different RAPL flags? Or else, a model
> list is still needed.
Introducing a synthethic CPU flag only makes sense for behavior that is
near-100% identical among models - ie. if the only thing missing is the
CPUID enumeration.
If RAPL details are continuously changing among CPU models, with no real
architected compatibility guarantees, then it probably only makes sense to
introduce the flag once it's enumerated at the CPUID level as well.
Thanks,
Ingo
Powered by blists - more mailing lists