Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1355161
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 00/12] perf: more fixes |
| Date | 2016-03-10 15:40 +0100 |
| Message-ID | <rb9US-8dN-17@gated-at.bofh.it> (permalink) |
| References | <r5LTc-7ZZ-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Feb 24, 2016 at 06:45:39PM +0100, Peter Zijlstra wrote:
> With these patches syz-kaller can still trigger some fail; most notably some
> NMI watchdog triggers and a very sporadic unthrottle bug (much like last time).
So the below seems to make the sporadic unthrottle thing much less
likely in that I haven't seen it in several hours, my machine keeps
dying on NMI watchdog bits.
Boris, who has been running syz-kaller on AMD hardware and was hitting a
very similar bug with the AMD-IBS code, says its not fixed it for him,
so maybe there's still more to find.
---
Subject: perf: Fix unthrottle
Its possible to IOC_PERIOD while the event is throttled, this would
re-start the event and the next tick would then try to unthrottle it,
and find the event wasn't actually stopped anymore.
This would tickle a WARN in the x86-pmu code which isn't expecting to
start a !stopped event.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
kernel/events/core.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 712570dddacd..d39477390415 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4210,6 +4210,14 @@ static void __perf_event_period(struct perf_event *event,
active = (event->state == PERF_EVENT_STATE_ACTIVE);
if (active) {
perf_pmu_disable(ctx->pmu);
+ /*
+ * We could be throttled; unthrottle now to avoid the tick
+ * trying to unthrottle while we already re-started the event.
+ */
+ if (event->hw.interrupts == MAX_INTERRUPTS) {
+ event->hw.interrupts = 0;
+ perf_log_throttle(event, 1);
+ }
event->pmu->stop(event, PERF_EF_UPDATE);
}
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH 00/12] perf: more fixes Peter Zijlstra <peterz@infradead.org> - 2016-03-10 15:40 +0100
Re: [PATCH 00/12] perf: more fixes Vince Weaver <vince@deater.net> - 2016-03-10 15:50 +0100
Re: [PATCH 00/12] perf: more fixes Peter Zijlstra <peterz@infradead.org> - 2016-03-11 15:30 +0100
Re: [PATCH 00/12] perf: more fixes Borislav Petkov <bp@alien8.de> - 2016-03-11 16:50 +0100
Re: [PATCH 00/12] perf: more fixes Peter Zijlstra <peterz@infradead.org> - 2016-03-15 16:50 +0100
Re: [PATCH 00/12] perf: more fixes Peter Zijlstra <peterz@infradead.org> - 2016-03-17 00:10 +0100
Re: [PATCH 00/12] perf: more fixes Peter Zijlstra <peterz@infradead.org> - 2016-03-17 00:20 +0100
Re: [PATCH 00/12] perf: more fixes Borislav Petkov <bp@alien8.de> - 2016-03-17 13:00 +0100
Re: [PATCH 00/12] perf: more fixes Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-03-11 11:20 +0100
csiph-web