From: Peter Zijlstra <peterz@infradead.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-mm@kvack.org, apw@shadowen.org
Subject: Re: [patch 0/5] [RFC] Conversion of reverse map locks to semaphores
Date: Fri, 27 Jun 2008 10:53:09 +0200 [thread overview]
Message-ID: <1214556789.2801.19.camel@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20080626003632.049547282@sgi.com>
On Wed, 2008-06-25 at 17:36 -0700, Christoph Lameter wrote:
> (This is going to be the last patchset that I post from clameter@sgi.com.
> Please use cl@linux-foundation.org in the future.)
Congratulations on the new job I suppose.. :-)
> Having semaphores there instead of spinlocks is useful since it
> allows sleeping in various code paths. That sleeping is useful
> if one wants to implement callbacks to remove external mapping
> (like done in the mmu notifier).
>
> Also it seems that a semaphore helps RT and should avoid busy spinning
> on systems where these locks experience significant contention.
Please be careful with the wording here. Semaphores are evil esp for RT.
But luckily you're referring to a sleeping RW lock, which we call
RW-semaphore (but is not an actual semaphore).
You really scared some people saying this ;-)
> The first patches move tlb flushing around in such a way that
> the _lock's can always be taken in preemptible contexts.
>
> The i_mmap_sem used to be present until someone switched it to a spinlock in
> 2004 due to scaling concerns on NUMA with a benchmark called SDET. I was not
> able to locate that benchmark (but Andi Whitcroft has access and promised me
> some results).
>
> AIM9 results (3 samples) anon_vma conversion not applied:
>
> 5 exec_test 1048.95 1025.50 -23.45 -2.24% Program Loads/second
> 6 fork_test 4775.22 4945.16 169.94 3.56% Task Creations/second
>
> 5 exec_test 1057.00 1019.00 -38.00 -3.60% Program Loads/second
> 6 fork_test 4930.14 4760.00 -170.14 -3.45% Task Creations/second
>
> 5 exec_test 1047.50 1038.96 -8.54 -0.82% Program Loads/second
> 6 fork_test 4760.48 4925.07 164.59 3.46% Task Creations/second
>
> Loads per second seem to have down tendency. Task creations are up. Not sure
> how much jitter gets into it.
>
> The old page fault performance test on file backed pages
> (anon_vma conversion not applied, 250k per process):
>
> Before:
> Gb Rep Thr CLine User System Wall flt/cpu/s fault/wsec
> 0 3 1 1 0.00s 0.08s 0.00s261555.860 246536.848
> 0 3 2 1 0.00s 0.09s 0.00s219709.015 357800.362
> 0 3 4 1 0.19s 0.13s 0.01s 67810.629 218846.742
> 0 3 8 1 1.04s 0.21s 0.02s 17548.427 104461.093
>
> After:
> Gb Rep Thr CLine User System Wall flt/cpu/s fault/wsec
> 0 3 1 1 0.00s 0.09s 0.00s238813.108 243323.477
> 0 3 2 1 0.00s 0.10s 0.00s219706.818 354671.772
> 0 3 4 1 0.20s 0.13s 0.00s 64619.728 225528.586
> 0 3 8 1 1.09s 0.22s 0.02s 16644.421 101027.423
>
> A slight performance degradation in most regimes, just 4 processors
> is a bright spot.
Would you have any lockstat output for these locks?
Depending on the contention stats you could try an adaptive spin on the
readers. I doubt adaptive spins on the writer would work out well, with
the natural plenty-ness of readers..
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-06-27 8:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-26 0:36 Christoph Lameter
2008-06-26 0:36 ` [patch 1/5] Move tlb handling into free_pgtables() Christoph Lameter
2008-06-26 0:36 ` [patch 2/5] Move tlb flushing inside of unmap vmas Christoph Lameter
2008-06-26 0:36 ` [patch 3/5] Add capability to check if rwsems are contended Christoph Lameter
2008-06-26 0:36 ` [patch 4/5] Convert i_mmap_lock to a rw semaphore Christoph Lameter
2008-06-26 0:36 ` [patch 5/5] Convert anon_vma spinlock to " Christoph Lameter
2008-06-26 1:05 ` Andrea Arcangeli
2008-06-26 17:23 ` Christoph Lameter
2008-06-26 17:27 ` Andrea Arcangeli
2008-06-26 0:53 ` [patch 0/5] [RFC] Conversion of reverse map locks to semaphores Andrea Arcangeli
2008-06-26 17:19 ` Christoph Lameter
2008-06-27 8:53 ` Peter Zijlstra [this message]
2008-06-27 15:46 ` Christoph Lameter
2008-06-27 16:38 ` Peter Zijlstra
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=1214556789.2801.19.camel@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=apw@shadowen.org \
--cc=clameter@sgi.com \
--cc=linux-mm@kvack.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