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


Groups > linux.kernel > #1370641 > unrolled thread

Re: [tip:perf/core] perf/core: Verify we have a single perf_hw_context PMU

Started byPeter Zijlstra <peterz@infradead.org>
First post2016-04-04 16:10 +0200
Last post2016-04-13 13:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [tip:perf/core] perf/core: Verify we have a single  perf_hw_context PMU Peter Zijlstra <peterz@infradead.org> - 2016-04-04 16:10 +0200
    Re: [tip:perf/core] perf/core: Verify we have a single  perf_hw_context PMU Borislav Petkov <bp@suse.de> - 2016-04-04 20:50 +0200
    [tip:perf/core] perf/x86/amd/uncore: Do not register a task ctx for  uncore PMUs tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2016-04-13 13:50 +0200

#1370641 — Re: [tip:perf/core] perf/core: Verify we have a single perf_hw_context PMU

FromPeter Zijlstra <peterz@infradead.org>
Date2016-04-04 16:10 +0200
SubjectRe: [tip:perf/core] perf/core: Verify we have a single perf_hw_context PMU
Message-ID<rkdmy-47v-15@gated-at.bofh.it>
On Thu, Mar 31, 2016 at 02:23:20AM -0700, tip-bot for Peter Zijlstra wrote:
> Commit-ID:  26657848502b78474a5f17f9ce2ae6dc8d8d6262
> Gitweb:     http://git.kernel.org/tip/26657848502b78474a5f17f9ce2ae6dc8d8d6262
> Author:     Peter Zijlstra <peterz@infradead.org>
> AuthorDate: Tue, 22 Mar 2016 22:09:18 +0100
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Thu, 31 Mar 2016 10:30:41 +0200
> 
> perf/core: Verify we have a single perf_hw_context PMU
> 
> There should (and can) only be a single PMU for perf_hw_context
> events.
> 
> This is because of how we schedule events: once a hardware event fails to
> schedule (the PMU is 'full') we stop trying to add more. The trivial
> 'fix' would break the Round-Robin scheduling we do.


This triggered on AMD machines..

---
Subject: perf,amd: Do not register a task ctx for uncore PMUs

Uncore PMUs are per node, they cannot have per-task counters.

Reported-by: Borislav Petkov <bp@suse.de>
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/x86/events/amd/uncore.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c
index 3db9569..98ac573 100644
--- a/arch/x86/events/amd/uncore.c
+++ b/arch/x86/events/amd/uncore.c
@@ -263,6 +263,7 @@ static const struct attribute_group *amd_uncore_attr_groups[] = {
 };
 
 static struct pmu amd_nb_pmu = {
+	.task_ctx_nr	= perf_invalid_context,
 	.attr_groups	= amd_uncore_attr_groups,
 	.name		= "amd_nb",
 	.event_init	= amd_uncore_event_init,
@@ -274,6 +275,7 @@ static struct pmu amd_nb_pmu = {
 };
 
 static struct pmu amd_l2_pmu = {
+	.task_ctx_nr	= perf_invalid_context,
 	.attr_groups	= amd_uncore_attr_groups,
 	.name		= "amd_l2",
 	.event_init	= amd_uncore_event_init,

[toc] | [next] | [standalone]


#1370819

FromBorislav Petkov <bp@suse.de>
Date2016-04-04 20:50 +0200
Message-ID<rkhJw-7va-15@gated-at.bofh.it>
In reply to#1370641
On Mon, Apr 04, 2016 at 04:02:08PM +0200, Peter Zijlstra wrote:
> This triggered on AMD machines..
> 
> ---
> Subject: perf,amd: Do not register a task ctx for uncore PMUs
> 
> Uncore PMUs are per node, they cannot have per-task counters.
> 
> Reported-by: Borislav Petkov <bp@suse.de>
	  ^
	  -and-tested-by: moi

> Reported-by: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  arch/x86/events/amd/uncore.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

...

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

[toc] | [prev] | [next] | [standalone]


#1377829 — [tip:perf/core] perf/x86/amd/uncore: Do not register a task ctx for uncore PMUs

Fromtip-bot for Peter Zijlstra <tipbot@zytor.com>
Date2016-04-13 13:50 +0200
Subject[tip:perf/core] perf/x86/amd/uncore: Do not register a task ctx for uncore PMUs
Message-ID<rnrt1-BH-47@gated-at.bofh.it>
In reply to#1370641
Commit-ID:  31d50c551e30923b86a1b5b420920dd1927fa63b
Gitweb:     http://git.kernel.org/tip/31d50c551e30923b86a1b5b420920dd1927fa63b
Author:     Peter Zijlstra <peterz@infradead.org>
AuthorDate: Mon, 4 Apr 2016 16:02:08 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 13 Apr 2016 11:56:36 +0200

perf/x86/amd/uncore: Do not register a task ctx for uncore PMUs

The new sanity check introduced by:

  26657848502b ("perf/core: Verify we have a single perf_hw_context PMU")

... triggered on the AMD uncore driver.

Uncore PMUs are per node, they cannot have per-task counters. Fix it.

Reported-by: Borislav Petkov <bp@suse.de>
Reported-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: acme@redhat.com
Cc: alexander.shishkin@linux.intel.com
Cc: eranian@google.com
Cc: jolsa@redhat.com
Cc: linux-tip-commits@vger.kernel.org
Cc: vincent.weaver@maine.edu
Link: http://lkml.kernel.org/r/20160404140208.GA3448@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/events/amd/uncore.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c
index 3db9569..98ac573 100644
--- a/arch/x86/events/amd/uncore.c
+++ b/arch/x86/events/amd/uncore.c
@@ -263,6 +263,7 @@ static const struct attribute_group *amd_uncore_attr_groups[] = {
 };
 
 static struct pmu amd_nb_pmu = {
+	.task_ctx_nr	= perf_invalid_context,
 	.attr_groups	= amd_uncore_attr_groups,
 	.name		= "amd_nb",
 	.event_init	= amd_uncore_event_init,
@@ -274,6 +275,7 @@ static struct pmu amd_nb_pmu = {
 };
 
 static struct pmu amd_l2_pmu = {
+	.task_ctx_nr	= perf_invalid_context,
 	.attr_groups	= amd_uncore_attr_groups,
 	.name		= "amd_l2",
 	.event_init	= amd_uncore_event_init,

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web