Re: [PATCH v2 -tip 0/6] locking: Introduce range reader/writer lock

From: Peter Zijlstra
Date: Wed Apr 19 2017 - 08:37:57 EST


On Thu, Apr 06, 2017 at 01:46:14AM -0700, Davidlohr Bueso wrote:
> ** What's still pending:
> - Debug support (it's been a pain to use lockdep with range locking).

How so? Just assume that every range is the full range. Which isn't such
a weird assumption as it would seem. After all, you cannot assume
anything much about the ranges to begin with. So therefore you cannot
assume the ranges don't all overlap either. At which point you're back
to the regular r/w semantics for deadlocks.

Also:

- explain interval order and what that means for forward progress
guarantees. This is currently still unparsable.

- explain why the loss of lock stealing makes sense. IIRC walken added
that specifically to address mmap_sem performance issues.