Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-04 Thread Peter Zijlstra
On Fri, Aug 04, 2017 at 11:17:02AM +0200, Peter Zijlstra wrote: > Yeah, I'll make it pretty, write a changelog and things like that :-) Slightly different from the earlier one in that I now pass @mm along instead of @vma. Same thing otherwise. --- Subject: perf,x86: Fix RDPMC vs mm_struct

Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-04 Thread Peter Zijlstra
On Fri, Aug 04, 2017 at 11:17:02AM +0200, Peter Zijlstra wrote: > Yeah, I'll make it pretty, write a changelog and things like that :-) Slightly different from the earlier one in that I now pass @mm along instead of @vma. Same thing otherwise. --- Subject: perf,x86: Fix RDPMC vs mm_struct

Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-04 Thread Peter Zijlstra
On Thu, Aug 03, 2017 at 05:37:22PM -0700, Andy Lutomirski wrote: > Reviewed-by: Andy Lutomirski Thanks! > Can you send it upstream and tag it for stable? Yeah, I'll make it pretty, write a changelog and things like that :-)

Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-04 Thread Peter Zijlstra
On Thu, Aug 03, 2017 at 05:37:22PM -0700, Andy Lutomirski wrote: > Reviewed-by: Andy Lutomirski Thanks! > Can you send it upstream and tag it for stable? Yeah, I'll make it pretty, write a changelog and things like that :-)

Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-03 Thread Andy Lutomirski
On Wed, Aug 2, 2017 at 10:39 AM, Peter Zijlstra wrote: > On Wed, Jul 26, 2017 at 03:39:01PM -0400, Vince Weaver wrote: >> Hello >> >> so one last bug found by the PAPI testsuite. >> >> This one involves the rdpmc auto-disable on last unmap of an event >> feature. >> >>

Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-03 Thread Andy Lutomirski
On Wed, Aug 2, 2017 at 10:39 AM, Peter Zijlstra wrote: > On Wed, Jul 26, 2017 at 03:39:01PM -0400, Vince Weaver wrote: >> Hello >> >> so one last bug found by the PAPI testsuite. >> >> This one involves the rdpmc auto-disable on last unmap of an event >> feature. >> >> Failing test case: >> >>

Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-03 Thread Vince Weaver
On Wed, 2 Aug 2017, Peter Zijlstra wrote: > On Wed, Jul 26, 2017 at 03:39:01PM -0400, Vince Weaver wrote: > > In fact, current->mm->context.perf_rdpmc_allowed goes negative which seems > > like it shouldn't happen? > > Good find that... > > The below seems to fix that for me. yes, I can

Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-03 Thread Vince Weaver
On Wed, 2 Aug 2017, Peter Zijlstra wrote: > On Wed, Jul 26, 2017 at 03:39:01PM -0400, Vince Weaver wrote: > > In fact, current->mm->context.perf_rdpmc_allowed goes negative which seems > > like it shouldn't happen? > > Good find that... > > The below seems to fix that for me. yes, I can

Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-02 Thread Peter Zijlstra
On Wed, Jul 26, 2017 at 03:39:01PM -0400, Vince Weaver wrote: > Hello > > so one last bug found by the PAPI testsuite. > > This one involves the rdpmc auto-disable on last unmap of an event > feature. > > Failing test case: > > fd=perf_event_open(); > addr=mmap(fd); > exec()

Re: perf: bug in rdpmc/mmap accounting after exec

2017-08-02 Thread Peter Zijlstra
On Wed, Jul 26, 2017 at 03:39:01PM -0400, Vince Weaver wrote: > Hello > > so one last bug found by the PAPI testsuite. > > This one involves the rdpmc auto-disable on last unmap of an event > feature. > > Failing test case: > > fd=perf_event_open(); > addr=mmap(fd); > exec()

perf: bug in rdpmc/mmap accounting after exec

2017-07-26 Thread Vince Weaver
Hello so one last bug found by the PAPI testsuite. This one involves the rdpmc auto-disable on last unmap of an event feature. Failing test case: fd=perf_event_open(); addr=mmap(fd); exec() // without closing or unmapping the event fd=perf_event_open();

perf: bug in rdpmc/mmap accounting after exec

2017-07-26 Thread Vince Weaver
Hello so one last bug found by the PAPI testsuite. This one involves the rdpmc auto-disable on last unmap of an event feature. Failing test case: fd=perf_event_open(); addr=mmap(fd); exec() // without closing or unmapping the event fd=perf_event_open();