lkml.org 
[lkml]   [2013]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] rwsem: reduce spinlock contention in wakeup code path
From
On Sat, Sep 28, 2013 at 11:55 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> Btw, I really hate that thing. I think we should turn it back into a
> spinlock. None of what it protects needs a mutex or an rwsem.
>
> Because you guys talk about the regression of turning it into a rwsem,
> but nobody talks about the *original* regression.
>
> And it *used* to be a spinlock, and it was changed into a mutex back
> in 2011 by commit 2b575eb64f7a. That commit doesn't even have a reason
> listed for it, although my dim memory of it is that the reason was
> preemption latency.

I was wondering about that too. Regarding latencies, we used to have
unbounded latencies for anon_vma operations as the AVC chains could
get long under some workloads; now that we index the VMAs matching a
given anon_vma with an interval tree this particular source of
latencies should be gone. So yes, it could be worth trying to go back
to a non-sleeping lock.

That said, I am very scared of using rwlock_t here, and I would much
prefer we choose a fair lock (either spinlock or a new rwlock
implementation which guarantees not to starve any locker thread)

--
Michel Lespinasse
A program is never fully debugged until the last user dies.


\
 
 \ /
  Last update: 2013-09-30 03:41    [W:0.155 / U:25.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site