From: Tim Chen <tim.c.chen@linux.intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andi Kleen <ak@linux.intel.com>,
Shaohua Li <shaohua.li@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
David Miller <davem@davemloft.net>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Russell King <rmk@arm.linux.org.uk>,
Paul Mundt <lethal@linux-sh.org>, Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
"Luck, Tony" <tony.luck@intel.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Mel Gorman <mel@csn.ul.ie>, Nick Piggin <npiggin@kernel.dk>,
Namhyung Kim <namhyung@gmail.com>,
"Shi, Alex" <alex.shi@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: REGRESSION: Performance regressions from switching anon_vma->lock to mutex
Date: Fri, 17 Jun 2011 11:22:43 -0700 [thread overview]
Message-ID: <1308334963.17300.489.camel@schen9-DESK> (raw)
In-Reply-To: <BANLkTinUBTYWxrF5TCuDSQuFUAyivXJXjQ@mail.gmail.com>
On Thu, 2011-06-16 at 20:58 -0700, Linus Torvalds wrote:
>
> So Tim, I'd like you to test out my first patch (that only does the
> anon_vma_clone() case) once again, but now in the cleaned-up version.
> Does this patch really make a big improvement for you? If so, this
> first step is probably worth doing regardless of the more complicated
> second step, but I'd want to really make sure it's ok, and that the
> performance improvement you saw is consistent and not a fluke.
>
> Linus
Linus,
For this patch, I've run it 10 times and got an average throughput of
104.9% compared with 2.6.39 vanilla baseline. Wide variations are seen
run to run and the difference between max and min throughput is 52% of
average value.
So to recap,
Throughput
2.6.39(vanilla) 100.0%
2.6.39+ra-patch 166.7% (+66.7%)
3.0-rc2(vanilla) 68.0% (-32%)
3.0-rc2+linus 115.7% (+15.7%)
3.0-rc2+linus+softirq 86.2% (-17.3%)
3.0-rc2+linus (v2) 104.9% (+4.9%)
The time spent in the anon_vma mutex seems to directly affect
throughput.
In one run on your patch, I got a low throughput of 90.1% vs 2.6.39
throughput. The mutex_lock occupied 15.6% of cpu.
In another run, I got a high throughput of 120.8% vs 2.6.39 throughput.
The mutex lock occupied 7.5% of cpu.
I've attached the profiles of the two runs and a 3.0-rc2 vanilla run for
your reference.
I will follow up later with numbers that has Peter's patch added.
Thanks.
Tim
----------Profiles Below-------------------------
3.0-rc2+linus(v2) run 1 (90.1% throughput vs 2.6.39)
- 15.60% exim [kernel.kallsyms] [k] __mutex_lock_common.clone.5
- __mutex_lock_common.clone.5
- 99.99% __mutex_lock_slowpath
- mutex_lock
+ 75.52% anon_vma_lock.clone.10
+ 23.88% anon_vma_clone
- 4.38% exim [kernel.kallsyms] [k] _raw_spin_lock_irqsave
- _raw_spin_lock_irqsave
+ 82.83% cpupri_set
+ 6.75% try_to_wake_up
+ 5.35% release_pages
+ 1.72% pagevec_lru_move_fn
+ 0.93% get_page_from_freelist
+ 0.51% lock_timer_base.clone.20
+ 3.22% exim [kernel.kallsyms] [k] page_fault
+ 2.62% exim [kernel.kallsyms] [k] do_raw_spin_lock
+ 2.30% exim [kernel.kallsyms] [k] mutex_unlock
+ 2.02% exim [kernel.kallsyms] [k] unmap_vmas
3.0-rc2_linus(v2) run 2 (120.8% throughput vs 2.6.39)
- 7.53% exim [kernel.kallsyms] [k] __mutex_lock_common.clone.5
- __mutex_lock_common.clone.5
- 99.99% __mutex_lock_slowpath
- mutex_lock
+ 75.99% anon_vma_lock.clone.10
+ 22.68% anon_vma_clone
+ 0.70% unlink_file_vma
- 4.15% exim [kernel.kallsyms] [k] _raw_spin_lock_irqsave
- _raw_spin_lock_irqsave
+ 83.37% cpupri_set
+ 7.06% release_pages
+ 2.74% pagevec_lru_move_fn
+ 2.18% try_to_wake_up
+ 0.99% get_page_from_freelist
+ 0.59% lock_timer_base.clone.20
+ 0.58% lock_hrtimer_base.clone.16
+ 4.06% exim [kernel.kallsyms] [k] page_fault
+ 2.33% exim [kernel.kallsyms] [k] unmap_vmas
+ 2.22% exim [kernel.kallsyms] [k] do_raw_spin_lock
+ 2.05% exim [kernel.kallsyms] [k] page_cache_get_speculative
+ 1.98% exim [kernel.kallsyms] [k] mutex_unlock
3.0-rc2 vanilla run
- 18.60% exim [kernel.kallsyms] [k] __mutex_lock_common.clone.5 a??
- __mutex_lock_common.clone.5 a?(R)
- 99.99% __mutex_lock_slowpath a??
- mutex_lock a??
- 99.54% anon_vma_lock.clone.10 a??
+ 38.99% anon_vma_clone a??
+ 37.56% unlink_anon_vmas a??
+ 11.92% anon_vma_fork a??
+ 11.53% anon_vma_free a??
- 4.03% exim [kernel.kallsyms] [k] _raw_spin_lock_irqsave a??
- _raw_spin_lock_irqsave a??
+ 87.25% cpupri_set a??
+ 4.75% release_pages a??
+ 3.68% try_to_wake_up a??
+ 1.17% pagevec_lru_move_fn a??
+ 0.71% get_page_from_freelist a??
+ 3.00% exim [kernel.kallsyms] [k] do_raw_spin_lock a??
+ 2.90% exim [kernel.kallsyms] [k] page_fault a??
+ 2.25% exim [kernel.kallsyms] [k] mutex_unlock a??
+ 1.82% exim [kernel.kallsyms] [k] unmap_vmas a??
+ 1.62% exim [kernel.kallsyms] [k] copy_page_c a??
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-06-17 18:22 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-15 0:29 Tim Chen
2011-06-15 0:36 ` Andi Kleen
2011-06-17 19:07 ` Ingo Molnar
2011-06-15 1:21 ` Linus Torvalds
2011-06-15 3:42 ` Linus Torvalds
2011-06-15 1:26 ` Shaohua Li
2011-06-15 11:52 ` Peter Zijlstra
2011-06-15 12:49 ` Peter Zijlstra
2011-06-15 16:18 ` Andi Kleen
2011-06-15 16:45 ` Peter Zijlstra
2011-06-15 16:47 ` Andi Kleen
2011-06-15 18:43 ` Tim Chen
2011-06-15 20:32 ` Peter Zijlstra
2011-06-15 20:57 ` Andi Kleen
2011-06-15 21:12 ` Tim Chen
2011-06-15 21:37 ` Peter Zijlstra
2011-06-15 21:51 ` Linus Torvalds
2011-06-15 22:19 ` Andi Kleen
2011-06-16 0:16 ` Linus Torvalds
2011-06-16 20:14 ` Andi Kleen
2011-06-16 20:37 ` Linus Torvalds
2011-06-17 0:24 ` Andi Kleen
2011-06-17 9:13 ` Ingo Molnar
2011-06-15 22:15 ` Andi Kleen
2011-06-16 1:08 ` Tim Chen
2011-06-16 1:50 ` Linus Torvalds
2011-06-16 20:26 ` Tim Chen
2011-06-16 20:47 ` Linus Torvalds
2011-06-16 21:05 ` Linus Torvalds
2011-06-16 21:06 ` Linus Torvalds
2011-06-16 21:26 ` Linus Torvalds
2011-06-17 3:58 ` Linus Torvalds
2011-06-17 11:28 ` Peter Zijlstra
2011-06-17 11:54 ` Peter Zijlstra
2011-06-17 16:36 ` Linus Torvalds
2011-06-17 17:41 ` Hugh Dickins
2011-06-17 17:55 ` Peter Zijlstra
2011-06-17 18:01 ` Linus Torvalds
2011-06-17 18:18 ` Peter Zijlstra
2011-06-17 18:32 ` Peter Zijlstra
2011-06-17 18:39 ` Linus Torvalds
2011-06-17 18:41 ` Linus Torvalds
2011-06-17 20:19 ` Tim Chen
2011-06-17 22:20 ` Hugh Dickins
2011-06-18 4:47 ` Linus Torvalds
2011-06-17 19:53 ` [PATCH] mm, memory-failure: Fix spinlock vs mutex order Peter Zijlstra
2011-06-17 20:04 ` Andi Kleen
2011-06-17 16:46 ` REGRESSION: Performance regressions from switching anon_vma->lock to mutex Linus Torvalds
2011-06-17 17:28 ` Linus Torvalds
2011-06-17 19:40 ` Andi Kleen
2011-06-18 8:08 ` Ingo Molnar
2011-06-17 18:22 ` Tim Chen [this message]
2011-06-17 19:05 ` Ray Lee
2011-06-16 22:00 ` Andi Kleen
2011-06-15 10:36 ` Peter Zijlstra
2011-06-15 10:58 ` Peter Zijlstra
2011-06-15 11:41 ` Peter Zijlstra
2011-06-15 19:11 ` Linus Torvalds
2011-06-15 19:24 ` Andrew Morton
2011-06-15 20:16 ` Ingo Molnar
2011-06-15 20:55 ` Linus Torvalds
2011-06-15 20:12 ` [GIT PULL] " Ingo Molnar
2011-06-15 20:29 ` Paul E. McKenney
2011-06-15 20:47 ` Linus Torvalds
2011-06-15 20:54 ` Paul E. McKenney
2011-06-15 21:05 ` Linus Torvalds
2011-06-15 21:15 ` Paul E. McKenney
2011-06-15 21:27 ` Linus Torvalds
2011-06-16 7:03 ` Ingo Molnar
2011-06-16 17:16 ` Paul E. McKenney
2011-06-16 20:25 ` Ingo Molnar
2011-06-16 21:01 ` Frederic Weisbecker
2011-06-16 23:02 ` Ingo Molnar
2011-06-17 15:19 ` Frederic Weisbecker
2011-06-16 21:02 ` Andi Kleen
2011-06-16 22:21 ` Benjamin Herrenschmidt
2011-06-16 22:38 ` Ingo Molnar
2011-06-16 22:47 ` Andi Kleen
2011-06-16 22:58 ` Ingo Molnar
2011-06-17 0:45 ` Paul E. McKenney
2011-06-17 9:43 ` Ingo Molnar
2011-06-17 16:48 ` Paul E. McKenney
2011-06-16 23:37 ` Paul E. McKenney
2011-06-15 20:13 ` Tim Chen
2011-06-15 20:17 ` Ingo Molnar
2011-06-15 20:21 ` 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=1308334963.17300.489.camel@schen9-DESK \
--to=tim.c.chen@linux.intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=alex.shi@intel.com \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=hughd@google.com \
--cc=jdike@addtoit.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=namhyung@gmail.com \
--cc=npiggin@kernel.dk \
--cc=richard@nod.at \
--cc=rjw@sisk.pl \
--cc=rmk@arm.linux.org.uk \
--cc=schwidefsky@de.ibm.com \
--cc=shaohua.li@intel.com \
--cc=tony.luck@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox