[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131001072815.GA20261@gmail.com>
Date: Tue, 1 Oct 2013 09:28:15 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Waiman Long <Waiman.Long@...com>, Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Rik van Riel <riel@...hat.com>,
Peter Hurley <peter@...leysoftware.com>,
Davidlohr Bueso <davidlohr.bueso@...com>,
Alex Shi <alex.shi@...el.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Matthew R Wilcox <matthew.r.wilcox@...el.com>,
Dave Hansen <dave.hansen@...el.com>,
Michel Lespinasse <walken@...gle.com>,
Andi Kleen <andi@...stfloor.org>,
"Chandramouleeswaran, Aswin" <aswin@...com>,
"Norton, Scott J" <scott.norton@...com>
Subject: Re: [PATCH] rwsem: reduce spinlock contention in wakeup code path
* Peter Zijlstra <peterz@...radead.org> wrote:
> On Mon, Sep 30, 2013 at 09:13:52AM -0700, Linus Torvalds wrote:
>
> > So unlike a lot of other "let's try to make our locking fancy" that I
> > dislike because it tends to hide the fundamental problem of
> > contention, the rwlock patches make me go "those actually _fix_ a
> > fundamental problem".
>
> So here I'm slightly disagreeing; fixing a fundamental problem would be
> coming up a better anon_vma management that doesn't create such immense
> chains.
So, I think the fundamental problem seems to be that when rwsems are
applied to this usecase, they still don't perform as well as a primitive
rwlock.
That means that when rwsems cause a context switch it is a loss, while an
rwlock_t burning CPU time by looping around is a win. I'm not sure it's
even about 'immense chains' - if those were true then context-switching
should actually improve performance by allowing other work to continue
while the heavy chains are processed.
Alas that's not what happens!
Or is AIM7 essentially triggering a single large lock? I doubt that's the
case though.
> Its still the same lock, spinlock or not.
>
> And regardless of if we keep anon_vma lock a rwsem or not; I think we
> should merge those rwsem patches as they do improve the lock
> implementation and the hard work has already been done.
That I mostly agree with, except that without a serious usecase do we have
a guarantee that bugs in fancies queueing in rwsems gets ironed out?
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists