linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Howells <dhowells@redhat.com>,
	linux-kernel@vger.kernel.org, lkp@linux.intel.com
Subject: Re: aim7 performance regression by commit 5a50508 report from LKP
Date: Tue, 29 Jan 2013 10:12:45 +0100	[thread overview]
Message-ID: <20130129091245.GB5775@gmail.com> (raw)
In-Reply-To: <20130129090620.GT12678@yliu-dev.sh.intel.com>


* Yuanhan Liu <yuanhan.liu@linux.intel.com> wrote:

> On Tue, Jan 29, 2013 at 09:44:00AM +0100, Ingo Molnar wrote:
> > 
> > * Yuanhan Liu <yuanhan.liu@linux.intel.com> wrote:
> > 
> > > [...]
> > 
> > Very nice measurements and analysis, thanks!
> > 
> > > As stated above, anybody can have a chance to own the lock in 
> > > mutex once somebody release the lock. Well, there is only one 
> > > to own the lock in rwsem write lock, and the one is known 
> > > already: the one in the head of wait list. That would result 
> > > to more contention in rwsem write lock case, especially if the 
> > > one _will_ own the lock is not running now.
> > 
> > I think we should allow lock-steal between rwsem writers - that 
> > will not hurt fairness as most rwsem fairness concerns relate to 
> > reader vs. writer fairness.
> 
> Agreed, and I'm sure this will improve performance and may 
> make this performance regression go away.
> 
> David, is that Ok to you? If so, I may have a try.

I'm not David but please try it :-)

Making rwsem behavior and scalability similar to mutexes would 
have numerous advantages.

> > Am I correct to assume that all relevant users in this 
> > workload are down_write() users?
> 
> Yes, as commit 5a50508 just convert all mutex to down_write.

A second track of inquiry would be to see whether any of the key 
usage sites could be converted to down_read() or whether the 
lock hold times could be reduced drastically - but I doubt 
that's really possible on such heavily forking workloads.

Thanks,

	Ingo

  reply	other threads:[~2013-01-29  9:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29  8:25 aim7 performance regression by commit 5a50508 report from LKP Yuanhan Liu
2013-01-29  8:44 ` Ingo Molnar
2013-01-29  9:06   ` Yuanhan Liu
2013-01-29  9:12     ` Ingo Molnar [this message]
2013-01-30  9:34       ` Yuanhan Liu
2013-01-31 11:22         ` Ingo Molnar
2013-02-01 10:53           ` Yuanhan Liu

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=20130129091245.GB5775@gmail.com \
    --to=mingo@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@linux.intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=ying.huang@intel.com \
    --cc=yuanhan.liu@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).