Re: [PATCH v2 -tip 0/6] locking: Introduce range reader/writer lock
From: Peter Zijlstra
Date: Thu Apr 20 2017 - 15:17:18 EST
On Thu, Apr 20, 2017 at 11:36:46AM -0700, Davidlohr Bueso wrote:
> On Thu, 20 Apr 2017, Peter Zijlstra wrote:
> >Those are about avoiding actually going to sleep and having to be woken
> >up (and waiting to become running) again, which is a long time.
>
> Yes, which is why I was thinking of ways to mitigate this. Ie: for
> blocked writers with low counts of 'blocking_ranges'.
So for this it would be good to have a better understanding of that
whole fairness / interval order crud.
IIRC rwsem only does writer-writer stealing and opt spinning, right? And
for stealing it doesn't matter how many are pending, just that you are
running and they are not (and then you get fairness issues and handover
etc..).
For opt spinning we need to specifically know who would be next in
order, again, doesn't matter how many, just who's next.