public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Alex Shi <alex.shi@intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: torvalds@linux-foundation.org, paul.gortmaker@windriver.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rwsem: steal writing sem for better performance
Date: Wed, 6 Feb 2013 12:28:11 +0100	[thread overview]
Message-ID: <20130206112811.GD8696@gmail.com> (raw)
In-Reply-To: <51119ED0.3030207@intel.com>


* Alex Shi <alex.shi@intel.com> wrote:

> On 02/05/2013 10:58 PM, Ingo Molnar wrote:
> > 
> > * Alex Shi <alex.shi@intel.com> wrote:
> > 
> >> Commit 5a50508 change to rwsem from mutex, that cause aim7 
> >> fork_test dropped 50%. Yuanhan liu does a good analysis, 
> >> find it caused by strict sequential writing. Ingo suggest 
> >> stealing sem writing from front task in waiting queue. 
> >> https://lkml.org/lkml/2013/1/29/84 So has this patch.
> >>
> >> In this patch, I just allow writing steal happen when the 
> >> first waiter is also writer. Then the performance fully 
> >> recovered.
> > 
> > All the aim7 fork_test performance regression is recovered?
> 
> Sure. 100% recovered on my NHM EP, NHM EX, SNB EP 2S and 4S 
> machines.

That's totally awesome!

Linus, Andrew, what is your thinking about the patch and about 
the timing of the patch?

It looks correct and straightforward to me, but rwsem races 
tended to be tricky to find and fix in the past...

We are in -rc7 territory which is a bit late for fundamental 
locking changes.

OTOH this is a regression fix, and not a small one.

I'll queue it up optimistically in an urgent branch for the time 
being, to see what happens with a few days of testing ... If 
there's any problems with it then it's clearly ineligible.

Thanks,

	Ingo

  reply	other threads:[~2013-02-06 11:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 13:11 [PATCH] rwsem: steal writing sem for better performance Alex Shi
2013-02-05 14:58 ` Ingo Molnar
2013-02-06  0:07   ` Alex Shi
2013-02-06 11:28     ` Ingo Molnar [this message]
2013-02-06 21:36       ` Linus Torvalds
2013-02-06 21:47         ` Ingo Molnar
2013-02-06 13:52 ` [tip:core/urgent] rwsem: Implement writer lock-stealing for better scalability tip-bot for Alex Shi
2013-02-22 12:25 ` [tip:core/locking] " tip-bot for Alex Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130206112811.GD8696@gmail.com \
    --to=mingo@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox