linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tim Chen <tim.c.chen@linux.intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Alex Shi <alex.shi@linaro.org>, Andi Kleen <andi@firstfloor.org>,
	Michel Lespinasse <walken@google.com>,
	Davidlohr Bueso <davidlohr.bueso@hp.com>,
	Matthew R Wilcox <matthew.r.wilcox@intel.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Rik van Riel <riel@redhat.com>,
	Peter Hurley <peter@hurleysoftware.com>,
	"Paul E.McKenney" <paulmck@linux.vnet.ibm.com>,
	Jason Low <jason.low2@hp.com>, Waiman Long <Waiman.Long@hp.com>,
	YuanhanLiu <yuanhan.liu@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH v8 0/9] rwsem performance optimizations
Date: Mon, 04 Nov 2013 14:36:25 -0800	[thread overview]
Message-ID: <1383604585.11046.258.camel@schen9-DESK> (raw)
In-Reply-To: <1381948114.11046.194.camel@schen9-DESK>

Ingo,

Sorry for the late response.  My old 4 socket Westmere
test machine went down and I have to find a new one, 
which is a 4 socket Ivybridge machine with 15 cores per socket.

I've updated the workload as a perf benchmark (see patch)
attached.  The workload will mmap, then access memory
in the mmaped area and then unmap, doing so repeatedly
for a specified time.  Each thread is pinned to a
particular core, with the threads distributed evenly between
the sockets. The throughput is reported with standard deviation
info.

First some baseline comparing the workload with serialized mmap vs
without serialized mmap running under vanilla kernel.

Threads		Throughput	std dev(%)
		serail vs non serial
		mmap(%)
1		0.10		0.16
2		0.78		0.09
3		-5.00		0.12
4		-3.27		0.08
5		-0.11		0.09
10		5.32		0.10
20		-2.05		0.05
40		-9.75		0.15
60		11.69		0.05


Here's the data for complete rwsem patch vs the plain vanilla kernel
case.  Overall there's improvement except for the 3 thread case.

Threads		Throughput	std dev(%)
		vs vanilla(%)
1		0.62		0.11
2		3.86		0.10
3		-7.02		0.19
4		-0.01		0.13
5		2.74		0.06
10		5.66		0.03
20		1.44		0.09
40		5.54		0.09
60		15.63		0.13

Now testing with both patched kernel and vanilla kernel
running serialized mmap with mutex acquisition in user space.

Threads		Throughput	std dev(%)
		vs vanilla(%)
1		0.60		0.02
2		6.40		0.11
3		14.13		0.07
4		-2.41		0.07
5		1.05		0.08
10		4.15		0.05
20		-0.26		0.06
40		-3.45		0.13
60		-4.33		0.07

Here's another run with the rwsem patchset without
optimistic spinning

Threads		Throughput	std dev(%)
		vs vanilla(%)
1		0.81		0.04
2		2.85		0.17
3		-4.09		0.05
4		-8.31		0.07
5		-3.19		0.03
10		1.02		0.05
20		-4.77		0.04
40		-3.11		0.10
60		2.06		0.10

No-optspin comparing serialized mmaped workload under
patched kernel vs vanilla kernel

Threads		Throughput	std dev(%)
		vs vanilla(%)
1		0.57		0.03
2		2.13		0.17
3		14.78		0.33
4		-1.23		0.11
5		2.99		0.08
10		-0.43		0.10
20		0.01		0.03
40		3.03		0.10
60		-1.74		0.09


The data is a bit of a mixed bag.  I'll spin off
the MCS cleanup patch separately so we can merge that first
for Waiman's qrwlock work.

Tim

---

  reply	other threads:[~2013-11-04 22:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1380748401.git.tim.c.chen@linux.intel.com>
2013-10-02 22:38 ` Tim Chen
2013-10-03  7:32   ` Ingo Molnar
2013-10-07 22:57     ` Tim Chen
2013-10-09  6:15       ` Ingo Molnar
2013-10-09  7:28         ` Peter Zijlstra
2013-10-10  3:14           ` Linus Torvalds
2013-10-10  5:03             ` Davidlohr Bueso
2013-10-09 16:34         ` Tim Chen
2013-10-10  7:54           ` Ingo Molnar
2013-10-16  0:09             ` Tim Chen
2013-10-16  6:55               ` Ingo Molnar
2013-10-16 18:28                 ` Tim Chen
2013-11-04 22:36                   ` Tim Chen [this message]
2013-10-16 21:55                 ` Tim Chen
2013-10-18  6:52                   ` Ingo Molnar
2013-10-02 22:38 ` [PATCH v8 1/9] rwsem: check the lock before cpmxchg in down_write_trylock Tim Chen
2013-10-02 22:38 ` [PATCH v8 2/9] rwsem: remove 'out' label in do_wake Tim Chen
2013-10-02 22:38 ` [PATCH v8 3/9] rwsem: remove try_reader_grant label do_wake Tim Chen
2013-10-02 22:38 ` [PATCH v8 4/9] rwsem/wake: check lock before do atomic update Tim Chen
2013-10-02 22:38 ` [PATCH v8 5/9] MCS Lock: Restructure the MCS lock defines and locking code into its own file Tim Chen
2013-10-08 19:51   ` Rafael Aquini
2013-10-08 20:34     ` Tim Chen
2013-10-08 21:31       ` Rafael Aquini
2013-10-02 22:38 ` [PATCH v8 6/9] MCS Lock: optimizations and extra comments Tim Chen
2013-10-02 22:38 ` [PATCH v8 7/9] MCS Lock: Barrier corrections Tim Chen
2013-10-02 22:38 ` [PATCH v8 8/9] rwsem: do optimistic spinning for writer lock acquisition Tim Chen
2013-10-02 22:38 ` [PATCH v8 9/9] rwsem: reduce spinlock contention in wakeup code path Tim Chen

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=1383604585.11046.258.camel@schen9-DESK \
    --to=tim.c.chen@linux.intel.com \
    --cc=Waiman.Long@hp.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@linaro.org \
    --cc=andi@firstfloor.org \
    --cc=dave.hansen@intel.com \
    --cc=davidlohr.bueso@hp.com \
    --cc=jason.low2@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew.r.wilcox@intel.com \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peter@hurleysoftware.com \
    --cc=riel@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=walken@google.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