Re: [PATCH] locking/rwsem: Make owner store task pointer of last owning reader

From: Peter Zijlstra
Date: Tue Sep 11 2018 - 15:38:32 EST


On Tue, Sep 11, 2018 at 12:21:22PM -0700, Davidlohr Bueso wrote:
> On Mon, 10 Sep 2018, Peter Zijlstra wrote:
>
> > [ RT has something along those lines, and I have half a patch that
> > starts doing that too, but I never found enough time to really work on
> > it :-( ]
>
> But don't rt rwsems act pretty much like a regular mutex in that it only
> allows readers to nest, not share the lock because of priority inversion
> scenarios.
>
> Also, wrt rtmutex, will that top-spinner thing ever make it in?

Nah, tglx rewrote that a while ago. It's something semi clever now.
Lemme see if I can find the patch.

https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/kernel/locking/rwsem-rt.c?h=linux-4.18.y-rt&id=1a42d0b3c3f34895cb5d63e1cd2be02f6077919b