lkml.org 
[lkml]   [2017]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2017-04-20 19:14    [W:0.110 / U:3.388 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site