[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1437152633.3503.0.camel@localhost>
Date: Fri, 17 Jul 2015 10:03:53 -0700
From: Dasaratharaman Chandramouli
<dasaratharaman.chandramouli@...el.com>
To: Stephane Eranian <eranian@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Jacob Pan Jun <jacob.jun.pan@...ux.intel.com>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Nikhil Rao <nikhil.rao@...el.com>
Subject: Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing
(KNL)
On Mon, 2015-06-29 at 09:37 -0700, Dasaratharaman Chandramouli wrote:
> On Mon, 2015-06-22 at 13:56 -0700, Dasaratharaman Chandramouli wrote:
> > On Mon, 2015-06-22 at 11:52 -0700, Stephane Eranian wrote:
> > > On Fri, May 29, 2015 at 4:55 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> > > >
> > > > On Tue, May 26, 2015 at 11:47:39AM -0700, Dasaratharaman Chandramouli wrote:
> > > > > Knights Landing DRAM RAPL supports PKG and DRAM RAPL domains.
> > > > > DRAM RAPL has a different fixed energy unit (2^-16J) similar to
> > > > > that of HSW.
> > > > >
> > > >
> > > > Please also Cc the author of the code you're patching.
> > > >
> > > > Cc: Stephane Eranian <eranian@...gle.com>
> > > > > Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@...el.com>
> > > > > ---
> > > > > arch/x86/kernel/cpu/perf_event_intel_rapl.c | 20 ++++++++++++++++++++
> > > > > 1 file changed, 20 insertions(+)
> > > > >
> > > > > diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
> > > > > index 999289b9..96633fb 100644
> > > > > --- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c
> > > > > +++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
> > > > > @@ -86,6 +86,10 @@ static const char *rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
> > > > > 1<<RAPL_IDX_RAM_NRG_STAT|\
> > > > > 1<<RAPL_IDX_PP1_NRG_STAT)
> > > > >
> > > > > +/* Knights Landing has PKG, RAM */
> > > > > +#define RAPL_IDX_KNL (1<<RAPL_IDX_PKG_NRG_STAT|\
> > > > > + 1<<RAPL_IDX_RAM_NRG_STAT)
> > > > > +
> > > > > /*
> > > > > * event code: LSB 8 bits, passed in attr->config
> > > > > * any other bit is reserved
> > > > > @@ -487,6 +491,18 @@ static struct attribute *rapl_events_hsw_attr[] = {
> > > > > NULL,
> > > > > };
> > > > >
> > > > > +static struct attribute *rapl_events_knl_attr[] = {
> > > > > + EVENT_PTR(rapl_pkg),
> > > > > + EVENT_PTR(rapl_ram),
> > > > > +
> > > > > + EVENT_PTR(rapl_pkg_unit),
> > > > > + EVENT_PTR(rapl_ram_unit),
> > > > > +
> > > > > + EVENT_PTR(rapl_pkg_scale),
> > > > > + EVENT_PTR(rapl_ram_scale),
> > > > > + NULL,
> > > > > +};
> > > > > +
> > > > > static struct attribute_group rapl_pmu_events_group = {
> > > > > .name = "events",
> > > > > .attrs = NULL, /* patched at runtime */
> > > > > @@ -730,6 +746,10 @@ static int __init rapl_pmu_init(void)
> > > > > rapl_cntr_mask = RAPL_IDX_SRV;
> > > > > rapl_pmu_events_group.attrs = rapl_events_srv_attr;
> > > > > break;
> > > > > + case 87: /* Knights Landing */
> > > > > + rapl_add_quirk(rapl_hsw_server_quirk);
> > >
> > >
> > > Does KNL also have different raw units for RAM requiring the use of the quirk?
> >
> > That is right. KNL's DRAM has a different fixed energy unit (2^-16J)
> > similar to that of HSW
>
> Stepane, if there are no more comments/questions, could i get an ack?
Ping.
> >
> > >
> > > >
> > > > > + rapl_cntr_mask = RAPL_IDX_KNL;
> > > > > + rapl_pmu_events_group.attrs = rapl_events_knl_attr;
> > > >
> > > > break;
> > > >
> > > > ?
> >
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists