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


Groups > linux.kernel > #1349955

Re: hw_breakpoint: Fix Oops at destroying hw_breakpoint event on powerpc

From Michael Ellerman <mpe@ellerman.id.au>
Newsgroups linux.kernel
Subject Re: hw_breakpoint: Fix Oops at destroying hw_breakpoint event on powerpc
Date 2016-03-04 09:50 +0100
Message-ID <r8TAT-44r-11@gated-at.bofh.it> (permalink)
References <r8bJw-5SA-11@gated-at.bofh.it> <r8dBD-75k-13@gated-at.bofh.it> <r8dBE-75k-27@gated-at.bofh.it> <r8xK2-4Sk-5@gated-at.bofh.it> <r8yG7-5Ai-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 2016-03-03 at 11:20 +0100, Peter Zijlstra wrote:
> On Thu, Mar 03, 2016 at 08:23:38PM +1100, Michael Ellerman wrote:
> > On Wed, 2016-03-02 at 12:59 +0100, Peter Zijlstra wrote:
>
> Indeed, but if there's a preemption point in between setting and using
> that state, the ctx->task pointer might not actually still point to the
> same task. With inherited events the event might get swapped to the next
> task if it has the exact same (inherited) event configuration instead of
> reprogramming the hardware.

Yep that sounds like it would be bad for this code.

> > I can't think of a reason why we can't also store it per-cpu, but I could be
> > wrong, I don't know the code well and I haven't thought about it for very long.
>
> Right, so I'm not really up to snuff on the whole hw_breakpoint stuff
> either, that was bolted onto perf by mingo, fweisbec, kprasad and others
> while I was doing PMU bits, and I've never really dug into it.
>
> I understand kprasad is no longer with IBM, his email bounced. That's a
> shame because he knew about this stuff.. :/

I don't know that for sure but I suspect you're right, which is definitely a
shame.

> > Do you mind if I merge the following fix for now as a band-aid, and we'll try
> > and fix it up properly in the next few weeks (but maybe not in time for 4.5
> > final).
>
> OK, that works for me.
>
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Thanks. I've merged it into my fixes branch.

cheers

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] hw_breakpoint: Fix Oops at destroying hw_breakpoint event on powerpc Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2016-03-02 11:00 +0100
  Re: [PATCH] hw_breakpoint: Fix Oops at destroying hw_breakpoint  event on powerpc Peter Zijlstra <peterz@infradead.org> - 2016-03-02 12:50 +0100
  Re: hw_breakpoint: Fix Oops at destroying hw_breakpoint event on powerpc Michael Ellerman <mpe@ellerman.id.au> - 2016-03-02 13:00 +0100
    Re: hw_breakpoint: Fix Oops at destroying hw_breakpoint event on  powerpc Peter Zijlstra <peterz@infradead.org> - 2016-03-02 13:00 +0100
      Re: hw_breakpoint: Fix Oops at destroying hw_breakpoint event on  powerpc Michael Ellerman <mpe@ellerman.id.au> - 2016-03-03 10:30 +0100
        Re: hw_breakpoint: Fix Oops at destroying hw_breakpoint event on  powerpc Peter Zijlstra <peterz@infradead.org> - 2016-03-03 11:30 +0100
          Re: hw_breakpoint: Fix Oops at destroying hw_breakpoint event on  powerpc Michael Ellerman <mpe@ellerman.id.au> - 2016-03-04 09:50 +0100
  Re: hw_breakpoint: Fix Oops at destroying hw_breakpoint event on powerpc Michael Ellerman <mpe@ellerman.id.au> - 2016-03-05 23:30 +0100

csiph-web