Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1455413 > unrolled thread

[PATCH] perf/x86/intel/uncore: correct uncore num_counters

Started bykan.liang@intel.com
First post2016-08-02 21:20 +0200
Last post2016-08-10 22:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] perf/x86/intel/uncore: correct uncore num_counters kan.liang@intel.com - 2016-08-02 21:20 +0200
    Re: [PATCH] perf/x86/intel/uncore: correct uncore num_counters Ingo Molnar <mingo@kernel.org> - 2016-08-10 22:00 +0200

#1455413 — [PATCH] perf/x86/intel/uncore: correct uncore num_counters

Fromkan.liang@intel.com
Date2016-08-02 21:20 +0200
Subject[PATCH] perf/x86/intel/uncore: correct uncore num_counters
Message-ID<s1Nom-m7-1@gated-at.bofh.it>
From: Kan Liang <kan.liang@intel.com>

Some uncore boxes' num_counters for Haswell server and Broadwell server
are not correct. This patch make them consistent with the uncore
document.

Reported-by: Lukasz Odzioba <lukasz.odzioba@intel.com>
Signed-off-by: Kan Liang <kan.liang@intel.com>
---
 arch/x86/events/intel/uncore_snbep.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
index 824e540..8aee83b 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -2626,7 +2626,7 @@ void hswep_uncore_cpu_init(void)
 
 static struct intel_uncore_type hswep_uncore_ha = {
 	.name		= "ha",
-	.num_counters   = 5,
+	.num_counters   = 4,
 	.num_boxes	= 2,
 	.perf_ctr_bits	= 48,
 	SNBEP_UNCORE_PCI_COMMON_INIT(),
@@ -2645,7 +2645,7 @@ static struct uncore_event_desc hswep_uncore_imc_events[] = {
 
 static struct intel_uncore_type hswep_uncore_imc = {
 	.name		= "imc",
-	.num_counters   = 5,
+	.num_counters   = 4,
 	.num_boxes	= 8,
 	.perf_ctr_bits	= 48,
 	.fixed_ctr_bits	= 48,
@@ -2691,7 +2691,7 @@ static struct intel_uncore_type hswep_uncore_irp = {
 
 static struct intel_uncore_type hswep_uncore_qpi = {
 	.name			= "qpi",
-	.num_counters		= 5,
+	.num_counters		= 4,
 	.num_boxes		= 3,
 	.perf_ctr_bits		= 48,
 	.perf_ctr		= SNBEP_PCI_PMON_CTR0,
@@ -2773,7 +2773,7 @@ static struct event_constraint hswep_uncore_r3qpi_constraints[] = {
 
 static struct intel_uncore_type hswep_uncore_r3qpi = {
 	.name		= "r3qpi",
-	.num_counters   = 4,
+	.num_counters   = 3,
 	.num_boxes	= 3,
 	.perf_ctr_bits	= 44,
 	.constraints	= hswep_uncore_r3qpi_constraints,
@@ -2972,7 +2972,7 @@ static struct intel_uncore_type bdx_uncore_ha = {
 
 static struct intel_uncore_type bdx_uncore_imc = {
 	.name		= "imc",
-	.num_counters   = 5,
+	.num_counters   = 4,
 	.num_boxes	= 8,
 	.perf_ctr_bits	= 48,
 	.fixed_ctr_bits	= 48,
-- 
2.5.5

[toc] | [next] | [standalone]


#1459755

FromIngo Molnar <mingo@kernel.org>
Date2016-08-10 22:00 +0200
Message-ID<s4HPt-16w-51@gated-at.bofh.it>
In reply to#1455413
* kan.liang@intel.com <kan.liang@intel.com> wrote:

> From: Kan Liang <kan.liang@intel.com>
> 
> Some uncore boxes' num_counters for Haswell server and Broadwell server
> are not correct. This patch make them consistent with the uncore
> document.
> 
> Reported-by: Lukasz Odzioba <lukasz.odzioba@intel.com>
> Signed-off-by: Kan Liang <kan.liang@intel.com>
> ---
>  arch/x86/events/intel/uncore_snbep.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
> index 824e540..8aee83b 100644
> --- a/arch/x86/events/intel/uncore_snbep.c
> +++ b/arch/x86/events/intel/uncore_snbep.c
> @@ -2626,7 +2626,7 @@ void hswep_uncore_cpu_init(void)
>  
>  static struct intel_uncore_type hswep_uncore_ha = {
>  	.name		= "ha",
> -	.num_counters   = 5,
> +	.num_counters   = 4,
>  	.num_boxes	= 2,
>  	.perf_ctr_bits	= 48,
>  	SNBEP_UNCORE_PCI_COMMON_INIT(),
> @@ -2645,7 +2645,7 @@ static struct uncore_event_desc hswep_uncore_imc_events[] = {
>  
>  static struct intel_uncore_type hswep_uncore_imc = {
>  	.name		= "imc",
> -	.num_counters   = 5,
> +	.num_counters   = 4,
>  	.num_boxes	= 8,
>  	.perf_ctr_bits	= 48,
>  	.fixed_ctr_bits	= 48,
> @@ -2691,7 +2691,7 @@ static struct intel_uncore_type hswep_uncore_irp = {
>  
>  static struct intel_uncore_type hswep_uncore_qpi = {
>  	.name			= "qpi",
> -	.num_counters		= 5,
> +	.num_counters		= 4,
>  	.num_boxes		= 3,
>  	.perf_ctr_bits		= 48,
>  	.perf_ctr		= SNBEP_PCI_PMON_CTR0,
> @@ -2773,7 +2773,7 @@ static struct event_constraint hswep_uncore_r3qpi_constraints[] = {
>  
>  static struct intel_uncore_type hswep_uncore_r3qpi = {
>  	.name		= "r3qpi",
> -	.num_counters   = 4,
> +	.num_counters   = 3,
>  	.num_boxes	= 3,
>  	.perf_ctr_bits	= 44,
>  	.constraints	= hswep_uncore_r3qpi_constraints,
> @@ -2972,7 +2972,7 @@ static struct intel_uncore_type bdx_uncore_ha = {
>  
>  static struct intel_uncore_type bdx_uncore_imc = {
>  	.name		= "imc",
> -	.num_counters   = 5,
> +	.num_counters   = 4,
>  	.num_boxes	= 8,
>  	.perf_ctr_bits	= 48,
>  	.fixed_ctr_bits	= 48,

So this changelog really sucks: what was the effect of the bug?

Did we report bogus (or zero) counts for those non-existent counters - or did the 
code actually crash in a visible way?

Thanks,

	Ingo

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web