Messages in this thread | | | Date | Thu, 20 Apr 2017 10:13:26 -0700 | From | Davidlohr Bueso <> | Subject | Re: [PATCH v2 -tip 0/6] locking: Introduce range reader/writer lock |
| |
On Wed, 19 Apr 2017, Peter Zijlstra wrote:
> - explain why the loss of lock stealing makes sense. IIRC walken added > that specifically to address mmap_sem performance issues.
That's right, and the same applies to the writer spinning stuff; which can makes a huge difference - more so than plain stealing. But as I've mentioned, range locks can improve parallelism, which is/should be much more welcomed than optimizations to the primitive. So yeah, we loose in comparing a full range to rwsem (not to mention the xadd stuff). I have thought of some heuristics for avoiding sleeping under certain constraints, which could mitigate the spinning step we loose, but I fear it will never be exactly as fast as rwsems -- just consider we always take the tree->lock.
Thanks, Davidlohr
| |