Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1270994
| From | Vineet Gupta <Vineet.Gupta1@synopsys.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: local64_cmpxchg() in arc_perf_event_update() |
| Date | 2015-11-17 10:20 +0100 |
| Message-ID | <qvKAG-355-27@gated-at.bofh.it> (permalink) |
| References | <qvKAG-355-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tuesday 20 October 2015 02:05 AM, Alexey Brodkin wrote: > Hi Vineet, > > Looking at a patch that Peter Z mentioned: > http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/include/linux/perf_event.h?id=b0e878759452314676f > bdd71df4ac67e7d08de5d > > > And it says here http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/include/linux/perf_event.h#n160 > --------->8---------- > /* > * The last observed hardware counter value, updated with a > * local64_cmpxchg() such that pmu::read() can be called nested. > */ > local64_t prev_count; > --------->8---------- > > So now I think we may want to return to local64_cmpxchg() in arc_perf_event_update() as well. > The reason is having no control over generic perf code we cannot really guarantee that pmu->read() won't > happen at random moment right before we enter perf IRQ handler (where we execute arc_perf_event_update() directly). > > In other words arc_perf_event_update() is used in IRQ handler and outside it and chances are that > function will be reentered at some point. > > Agree? Let's check with Peter as I'm not sure how exactly the read call will nest for same counter on same core ? But if they do then indeed, then commit 1fe8bfa5ff3b (ARCv2: perf: implement "event_set_period") needs to be partially reverted. -Vineet -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: local64_cmpxchg() in arc_perf_event_update() Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 10:20 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Peter Zijlstra <peterz@infradead.org> - 2015-11-17 12:10 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 12:30 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Peter Zijlstra <peterz@infradead.org> - 2015-11-17 13:30 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Peter Zijlstra <peterz@infradead.org> - 2015-11-17 13:30 +0100
NMI for ARC Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 14:00 +0100
Re: NMI for ARC Peter Zijlstra <peterz@infradead.org> - 2015-11-17 14:20 +0100
Re: local64_cmpxchg() in arc_perf_event_update() Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 14:30 +0100
csiph-web