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 Thu, 20 Apr 2017, Peter Zijlstra wrote:

>On Thu, Apr 20, 2017 at 10:13:26AM -0700, Davidlohr Bueso wrote:
>
>> 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.
>
>But tree->lock is a spinlock, so while this gets us out of rwsem-xadd
>territory for the fast paths, the whole lock-stealing and optimistic
>spinning stuff is on a different scale.

Oh, absolutely. I was merely pointing out the differences at a hair
splitting level.

>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'.

Thanks,
Davidlohr

\
 
 \ /
  Last update: 2017-04-20 20:37    [W:0.075 / U:1.668 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site