[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1372091762.22432.16.camel@schen9-DESK>
Date: Mon, 24 Jun 2013 09:36:02 -0700
From: Tim Chen <tim.c.chen@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Alex Shi <alex.shi@...el.com>,
Andi Kleen <andi@...stfloor.org>,
Michel Lespinasse <walken@...gle.com>,
Davidlohr Bueso <davidlohr.bueso@...com>,
Matthew R Wilcox <matthew.r.wilcox@...el.com>,
Dave Hansen <dave.hansen@...el.com>,
Rik van Riel <riel@...hat.com>, linux-kernel@...r.kernel.org,
linux-mm <linux-mm@...ck.org>
Subject: Re: [PATCH 2/2] rwsem: do optimistic spinning for writer lock
acquisition
On Mon, 2013-06-24 at 10:46 +0200, Peter Zijlstra wrote:
> On Fri, Jun 21, 2013 at 04:51:40PM -0700, Tim Chen wrote:
> > Introduce in this patch optimistic spinning for writer lock
> > acquisition in read write semaphore. The logic is
> > similar to the optimistic spinning in mutex but without
> > the MCS lock queueing of the spinner. This provides a
> > better chance for a writer to acquire the lock before
> > being we block it and put it to sleep.
> >
> > Disabling of pre-emption during optimistic spinning
> > was suggested by Davidlohr Bueso. It
> > improved performance of aim7 for his test suite.
> >
> > Combined with the patch to avoid unnecesary cmpxchg,
> > in testing by Davidlohr Bueso on aim7 workloads
> > on 8 socket 80 cores system, he saw improvements of
> > alltests (+14.5%), custom (+17%), disk (+11%), high_systime
> > (+5%), shared (+15%) and short (+4%), most of them after around 500
> > users when he implemented i_mmap as rwsem.
> >
> > Signed-off-by: Tim Chen <tim.c.chen@...ux.intel.com>
> > ---
> > Makefile | 2 +-
> > include/linux/rwsem.h | 3 +
> > init/Kconfig | 9 +++
> > kernel/rwsem.c | 29 +++++++++-
> > lib/rwsem.c | 148 +++++++++++++++++++++++++++++++++++++++++++++----
> > 5 files changed, 178 insertions(+), 13 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 49aa84b..7d1ef64 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1,7 +1,7 @@
> > VERSION = 3
> > PATCHLEVEL = 10
> > SUBLEVEL = 0
> > -EXTRAVERSION = -rc4
> > +EXTRAVERSION = -rc4-optspin4
> > NAME = Unicycling Gorilla
> >
> > # *DOCUMENTATION*
>
> I'm fairly sure we don't want to commit this hunk ;-)
Fat fingers. Thanks for catching.
Tim
--
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