Re: [PATCH 0/2] perf/hw_breakpoint: Fix breakpoint overcommit issue

From: Peter Zijlstra
Date: Tue Jul 16 2019 - 09:50:39 EST


On Tue, Jul 16, 2019 at 03:42:20PM +0200, Frederic Weisbecker wrote:
> On Mon, Jul 15, 2019 at 02:47:37PM +0200, Peter Zijlstra wrote:
> > On Thu, Jul 11, 2019 at 12:53:05PM +0200, Peter Zijlstra wrote:
> > > > I wish we could use event->ctx->task instead but on pmu::init() there
> > > > is no ctx yet (we could pass the task in parameter though)
> > >
> > > Right, that should be fairly easy.
> > >
> > > > and on event->destroy() it's TASK_TOMBSTONE and retrieving the task at
> > > > that time would be non trivial.
> > >
> > > Well, right, we can maybe make TOMBSTONE be the LSB instead of the whole
> > > word, then we can recover the task pointer... *yuck* though.
> >
> > Something like the attached, completely untested patches.
> >
> > I didn't do the hw_breakpoint bit, because I got lost in that, but this
> > basically provides what you asked for I think.
> >
>
> Thanks they look good! I can take them and work on top if you like.

please do.