From: Dave Chinner <david@fromorbit.com>
To: Jason Low <jason.low2@hp.com>
Cc: Davidlohr Bueso <davidlohr@hp.com>,
Peter Zijlstra <peterz@infradead.org>,
Tim Chen <tim.c.chen@linux.intel.com>,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [regression, 3.16-rc] rwsem: optimistic spinning causing performance degradation
Date: Fri, 4 Jul 2014 18:21:28 +1000 [thread overview]
Message-ID: <20140704082128.GL9508@dastard> (raw)
In-Reply-To: <1404457579.8764.161.camel@j-VirtualBox>
On Fri, Jul 04, 2014 at 12:06:19AM -0700, Jason Low wrote:
> On Fri, 2014-07-04 at 16:13 +1000, Dave Chinner wrote:
> > On Thu, Jul 03, 2014 at 06:54:50PM -0700, Jason Low wrote:
> > > On Thu, 2014-07-03 at 18:46 -0700, Jason Low wrote:
> > > > On Fri, 2014-07-04 at 11:01 +1000, Dave Chinner wrote:
> > >
> > > > > FWIW, the rwsems in the struct xfs_inode are often heavily
> > > > > read/write contended, so there are lots of IO related workloads that
> > > > > are going to regress on XFS without this optimisation...
> > > > >
> > > > > Anyway, consider the patch:
> > > > >
> > > > > Tested-by: Dave Chinner <dchinner@redhat.com>
> > > >
> > > > Hi Dave,
> > > >
> > > > Thanks for testing. I'll update the patch with an actual changelog.
> > >
> > > ---
> > > Subject: [PATCH] rwsem: In rwsem_can_spin_on_owner(), return false if no owner
> > >
> > > It was found that the rwsem optimistic spinning feature can potentially degrade
> > > performance when there are readers. Perf profiles indicate in some workloads
> > > that significant time can be spent spinning on !owner. This is because we don't
> > > set the lock owner when readers(s) obtain the rwsem.
> >
> > I don't think you're being a little shifty with the truth here.
> > There's no "potentially degrade performance" here - I reported a
> > massive real world performance regression caused by optimistic
> > spinning.
>
> Sure, though I mainly used the word "potentially" since there can be
> other workloads out there where spinning even when readers have the lock
> is a positive thing.
>
> And agreed that the changelog can be modified to try reflecting more on
> it being a "regression fix" then a "new performance" addition.
>
> So how about the following?
Looks good. Thanks!
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2014-07-04 8:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1404413420.8764.42.camel@j-VirtualBox>
[not found] ` <1404416236.3179.18.camel@buesod1.americas.hpqcorp.net>
2014-07-03 20:08 ` [regression, 3.16-rc] rwsem: optimistic spinning causing performance degradation Davidlohr Bueso
2014-07-04 1:01 ` Dave Chinner
2014-07-04 1:46 ` Jason Low
2014-07-04 1:54 ` Jason Low
2014-07-04 6:13 ` Dave Chinner
2014-07-04 7:06 ` Jason Low
2014-07-04 8:21 ` Dave Chinner [this message]
2014-07-04 8:53 ` Davidlohr Bueso
2014-07-05 3:14 ` Jason Low
2014-07-04 7:52 ` Peter Zijlstra
2014-07-04 8:40 ` Davidlohr Bueso
2014-07-05 3:49 ` Jason Low
[not found] ` <CAAW_DMjgd5+EOvZX7_iZe-jHp=00Nf7MX3z6hBCRPgOfqnMtEA@mail.gmail.com>
2014-07-14 9:55 ` Peter Zijlstra
2014-07-14 17:10 ` Jason Low
2014-07-15 2:17 ` Dave Chinner
2014-07-16 19:20 ` [tip:locking/urgent] locking/rwsem: Allow conservative optimistic spinning when readers have lock tip-bot for Jason Low
2014-07-03 2:32 [regression, 3.16-rc] rwsem: optimistic spinning causing performance degradation Dave Chinner
2014-07-03 3:31 ` Davidlohr Bueso
2014-07-03 4:59 ` Dave Chinner
2014-07-03 5:39 ` Dave Chinner
2014-07-03 7:38 ` Peter Zijlstra
2014-07-03 7:56 ` Dave Chinner
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=20140704082128.GL9508@dastard \
--to=david@fromorbit.com \
--cc=davidlohr@hp.com \
--cc=jason.low2@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tim.c.chen@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.