[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-0158b83f7508851cda9e62c4b14678c5bd492cb2@git.kernel.org>
Date: Mon, 21 Mar 2016 02:49:02 -0700
From: tip-bot for Peter Zijlstra <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, jolsa@...hat.com, peterz@...radead.org,
namhyung@...nel.org, vince@...ter.net, luto@...capital.net,
bp@...en8.de, hpa@...or.com, mingo@...nel.org, dsahern@...il.com,
eranian@...gle.com, torvalds@...ux-foundation.org,
vincent.weaver@...ne.edu, dvlasenk@...hat.com, brgerst@...il.com,
tglx@...utronix.de, alexander.shishkin@...ux.intel.com,
linux-kernel@...r.kernel.org
Subject: [tip:perf/urgent] perf/x86/ibs: Fix IBS throttle
Commit-ID: 0158b83f7508851cda9e62c4b14678c5bd492cb2
Gitweb: http://git.kernel.org/tip/0158b83f7508851cda9e62c4b14678c5bd492cb2
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Fri, 11 Mar 2016 15:23:46 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 21 Mar 2016 09:08:15 +0100
perf/x86/ibs: Fix IBS throttle
When the IBS IRQ handler get a !0 return from perf_event_overflow;
meaning it should throttle the event, it only disables it, it doesn't
call perf_ibs_stop().
This confuses the state machine, as we'll use pmu::start() ->
perf_ibs_start() to unthrottle.
Tested-by: Borislav Petkov <bp@...en8.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Brian Gerst <brgerst@...il.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Vince Weaver <vince@...ter.net>
Cc: Vince Weaver <vincent.weaver@...ne.edu>
Cc: dvyukov@...gle.com
Cc: oleg@...hat.com
Cc: panand@...hat.com
Cc: sasha.levin@...cle.com
Link: http://lkml.kernel.org/r/20160311142346.GE6344@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/events/amd/ibs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c
index 51087c2..7956d29 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -599,7 +599,7 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)
throttle = perf_event_overflow(event, &data, ®s);
out:
if (throttle)
- perf_ibs_disable_event(perf_ibs, hwc, *config);
+ perf_ibs_stop(event, 0);
else
perf_ibs_enable_event(perf_ibs, hwc, period >> 4);
Powered by blists - more mailing lists