Re: [PATCH 00/10] perf/uprobe: Optimize uprobes

From: Paul E. McKenney
Date: Tue Jul 09 2024 - 11:57:03 EST


On Tue, Jul 09, 2024 at 05:31:32PM +0200, Peter Zijlstra wrote:
> On Tue, Jul 09, 2024 at 07:36:41AM -0700, Paul E. McKenney wrote:
>
> > > Per VMA refcounts or per VMA locks are a complete fail IMO.
> >
> > Not even to allow concurrent updates of the address space by different
> > threads of a process?
>
> Well, I'm sure it helps some workloads. But for others it is just moving
> the problem.

>From where I sit, helping a wide range of workloads is a good thing. ;-)

> > For me, per-VMA locking's need to RCU-protect the VMA is a good step
> > towards permitting RCU-protected scans of the Maple Tree, which then
> > gets lockless lookup.
>
> Right, the question is if the VMA lock is required to be stable against
> splitting. If that is the case, we're hosed :/

Let's just say that VMA splitting and merging has consumed much time
and effort from the usual suspects over the past while.

> At the time I added a seqcount for that, but I'm also remembering that's
> one of the things people complained about for single threaded
> performance.

Sequence locks are lighter weight these days, but again, this has been
very much a long-term whack-a-mole exercise with odd regressions.

Thanx, Paul