All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
@ 2015-05-26 18:47 Dasaratharaman Chandramouli
  2015-05-29 11:55 ` Peter Zijlstra
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Dasaratharaman Chandramouli @ 2015-05-26 18:47 UTC (permalink / raw)
  To: Jacob Pan Jun, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin
  Cc: x86, linux-kernel, Dasaratharaman Chandramouli, Nikhil Rao

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.

Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.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);
+		rapl_cntr_mask = RAPL_IDX_KNL;
+		rapl_pmu_events_group.attrs = rapl_events_knl_attr;
 
 	default:
 		/* unsupported */
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
  2015-05-26 18:47 [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL) Dasaratharaman Chandramouli
@ 2015-05-29 11:55 ` Peter Zijlstra
  2015-06-22 18:52   ` Stephane Eranian
  2015-07-17 18:06   ` Stephane Eranian
  2015-05-29 17:06 ` Jacob Pan
  2015-08-04  8:51 ` [tip:perf/core] " tip-bot for Dasaratharaman Chandramouli
  2 siblings, 2 replies; 10+ messages in thread
From: Peter Zijlstra @ 2015-05-29 11:55 UTC (permalink / raw)
  To: Dasaratharaman Chandramouli
  Cc: Jacob Pan Jun, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin, x86,
	linux-kernel, Nikhil Rao, Stephane Eranian

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@google.com>
> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.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);
> +		rapl_cntr_mask = RAPL_IDX_KNL;
> +		rapl_pmu_events_group.attrs = rapl_events_knl_attr;

		break;

?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
  2015-05-26 18:47 [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL) Dasaratharaman Chandramouli
  2015-05-29 11:55 ` Peter Zijlstra
@ 2015-05-29 17:06 ` Jacob Pan
  2015-06-22 17:17   ` Dasaratharaman Chandramouli
  2015-08-04  8:51 ` [tip:perf/core] " tip-bot for Dasaratharaman Chandramouli
  2 siblings, 1 reply; 10+ messages in thread
From: Jacob Pan @ 2015-05-29 17:06 UTC (permalink / raw)
  To: Dasaratharaman Chandramouli
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin, x86,
	linux-kernel, Nikhil Rao

On Tue, 26 May 2015 11:47:39 -0700
Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
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.
> 
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
> Signed-off-by: Dasaratharaman Chandramouli
> <dasaratharaman.chandramouli@intel.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);
> +		rapl_cntr_mask = RAPL_IDX_KNL;
> +		rapl_pmu_events_group.attrs = rapl_events_knl_attr;
>  
>  	default:
>  		/* unsupported */

[Jacob Pan]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
  2015-05-29 17:06 ` Jacob Pan
@ 2015-06-22 17:17   ` Dasaratharaman Chandramouli
  0 siblings, 0 replies; 10+ messages in thread
From: Dasaratharaman Chandramouli @ 2015-06-22 17:17 UTC (permalink / raw)
  To: Jacob Pan
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin, x86,
	linux-kernel, Nikhil Rao, Stephane Eranian

Ping. 

On Fri, 2015-05-29 at 10:06 -0700, Jacob Pan wrote:
> On Tue, 26 May 2015 11:47:39 -0700
> Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
> 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.
> > 
> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
> > Signed-off-by: Dasaratharaman Chandramouli
> > <dasaratharaman.chandramouli@intel.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);
> > +		rapl_cntr_mask = RAPL_IDX_KNL;
> > +		rapl_pmu_events_group.attrs = rapl_events_knl_attr;
> >  
> >  	default:
> >  		/* unsupported */
> 
> [Jacob Pan]


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
  2015-05-29 11:55 ` Peter Zijlstra
@ 2015-06-22 18:52   ` Stephane Eranian
  2015-06-22 20:56     ` Dasaratharaman Chandramouli
  2015-07-17 18:06   ` Stephane Eranian
  1 sibling, 1 reply; 10+ messages in thread
From: Stephane Eranian @ 2015-06-22 18:52 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Dasaratharaman Chandramouli, Jacob Pan Jun, Paul Mackerras,
	Ingo Molnar, Arnaldo Carvalho de Melo, Thomas Gleixner,
	H. Peter Anvin, x86, LKML, Nikhil Rao

On Fri, May 29, 2015 at 4:55 AM, Peter Zijlstra <peterz@infradead.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@google.com>
> > Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.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?

>
> > +             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
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
  2015-06-22 18:52   ` Stephane Eranian
@ 2015-06-22 20:56     ` Dasaratharaman Chandramouli
  2015-06-29 16:37       ` Dasaratharaman Chandramouli
  0 siblings, 1 reply; 10+ messages in thread
From: Dasaratharaman Chandramouli @ 2015-06-22 20:56 UTC (permalink / raw)
  To: Stephane Eranian
  Cc: Peter Zijlstra, Jacob Pan Jun, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin, x86,
	LKML, Nikhil Rao

On Mon, 2015-06-22 at 11:52 -0700, Stephane Eranian wrote:
> On Fri, May 29, 2015 at 4:55 AM, Peter Zijlstra <peterz@infradead.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@google.com>
> > > Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.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

> 
> >
> > > +             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
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
  2015-06-22 20:56     ` Dasaratharaman Chandramouli
@ 2015-06-29 16:37       ` Dasaratharaman Chandramouli
  2015-07-17 17:03         ` Dasaratharaman Chandramouli
  0 siblings, 1 reply; 10+ messages in thread
From: Dasaratharaman Chandramouli @ 2015-06-29 16:37 UTC (permalink / raw)
  To: Stephane Eranian
  Cc: Peter Zijlstra, Jacob Pan Jun, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin, x86,
	LKML, Nikhil Rao

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@infradead.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@google.com>
> > > > Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.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?
> 
> > 
> > >
> > > > +             rapl_cntr_mask = RAPL_IDX_KNL;
> > > > +             rapl_pmu_events_group.attrs = rapl_events_knl_attr;
> > >
> > >                 break;
> > >
> > > ?
> 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
  2015-06-29 16:37       ` Dasaratharaman Chandramouli
@ 2015-07-17 17:03         ` Dasaratharaman Chandramouli
  0 siblings, 0 replies; 10+ messages in thread
From: Dasaratharaman Chandramouli @ 2015-07-17 17:03 UTC (permalink / raw)
  To: Stephane Eranian
  Cc: Peter Zijlstra, Jacob Pan Jun, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin, x86,
	LKML, Nikhil Rao

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@infradead.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@google.com>
> > > > > Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.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;
> > > >
> > > > ?
> > 
> 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
  2015-05-29 11:55 ` Peter Zijlstra
  2015-06-22 18:52   ` Stephane Eranian
@ 2015-07-17 18:06   ` Stephane Eranian
  1 sibling, 0 replies; 10+ messages in thread
From: Stephane Eranian @ 2015-07-17 18:06 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Dasaratharaman Chandramouli, Jacob Pan Jun, Paul Mackerras,
	Ingo Molnar, Arnaldo Carvalho de Melo, Thomas Gleixner,
	H. Peter Anvin, x86, LKML, Nikhil Rao

On Fri, May 29, 2015 at 4:55 AM, Peter Zijlstra <peterz@infradead.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.
>
Acked-by: Stephane Eranian <eranian@google.com>

> Cc: Stephane Eranian <eranian@google.com>
>> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.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);
>> +             rapl_cntr_mask = RAPL_IDX_KNL;
>> +             rapl_pmu_events_group.attrs = rapl_events_knl_attr;
>
>                 break;
>
> ?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [tip:perf/core] perf/x86/intel/rapl: Add support for Knights Landing (KNL)
  2015-05-26 18:47 [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL) Dasaratharaman Chandramouli
  2015-05-29 11:55 ` Peter Zijlstra
  2015-05-29 17:06 ` Jacob Pan
@ 2015-08-04  8:51 ` tip-bot for Dasaratharaman Chandramouli
  2 siblings, 0 replies; 10+ messages in thread
From: tip-bot for Dasaratharaman Chandramouli @ 2015-08-04  8:51 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: nikhil.rao, peterz, hpa, paulus, torvalds,
	dasaratharaman.chandramouli, jacob.jun.pan, acme, eranian, mingo,
	linux-kernel, tglx

Commit-ID:  3a2a7797326a4bc59b7ff0cc92c8b274abf21892
Gitweb:     http://git.kernel.org/tip/3a2a7797326a4bc59b7ff0cc92c8b274abf21892
Author:     Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
AuthorDate: Tue, 26 May 2015 11:47:39 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 4 Aug 2015 10:16:52 +0200

perf/x86/intel/rapl: Add support for Knights Landing (KNL)

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.

Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Stephane Eranian <eranian@google.com>
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jacob Pan Jun <jacob.jun.pan@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nikhil Rao <nikhil.rao@intel.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/aa63b4a3af3160152fea1a10c807f4200527280c.1432665809.git.dasaratharaman.chandramouli@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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 5cbd4e6..81431c0 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
@@ -486,6 +490,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);
+		rapl_cntr_mask = RAPL_IDX_KNL;
+		rapl_pmu_events_group.attrs = rapl_events_knl_attr;
 
 	default:
 		/* unsupported */

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-08-04  8:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26 18:47 [PATCH] perf/x86/intel/rapl: Add support for Knights Landing (KNL) Dasaratharaman Chandramouli
2015-05-29 11:55 ` Peter Zijlstra
2015-06-22 18:52   ` Stephane Eranian
2015-06-22 20:56     ` Dasaratharaman Chandramouli
2015-06-29 16:37       ` Dasaratharaman Chandramouli
2015-07-17 17:03         ` Dasaratharaman Chandramouli
2015-07-17 18:06   ` Stephane Eranian
2015-05-29 17:06 ` Jacob Pan
2015-06-22 17:17   ` Dasaratharaman Chandramouli
2015-08-04  8:51 ` [tip:perf/core] " tip-bot for Dasaratharaman Chandramouli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.