Re: [RFC][PATCH 6/8] mm: handle_speculative_fault()
[Posted January 12, 2010 by corbet]
| From: |
| Linus Torvalds <torvalds-AT-linux-foundation.org> |
| To: |
| KAMEZAWA Hiroyuki <kamezawa.hiroyu-AT-jp.fujitsu.com> |
| Subject: |
| Re: [RFC][PATCH 6/8] mm: handle_speculative_fault() |
| Date: |
| Tue, 5 Jan 2010 07:26:31 -0800 (PST) |
| Cc: |
| Minchan Kim <minchan.kim-AT-gmail.com>,
Peter Zijlstra <a.p.zijlstra-AT-chello.nl>,
"Paul E. McKenney" <paulmck-AT-linux.vnet.ibm.com>,
Peter Zijlstra <peterz-AT-infradead.org>,
"linux-kernel-AT-vger.kernel.org" <linux-kernel-AT-vger.kernel.org>,
"linux-mm-AT-kvack.org" <linux-mm-AT-kvack.org>, cl-AT-linux-foundation.org,
"hugh.dickins" <hugh.dickins-AT-tiscali.co.uk>,
Nick Piggin <nickpiggin-AT-yahoo.com.au>, Ingo Molnar <mingo-AT-elte.hu> |
On Tue, 5 Jan 2010, KAMEZAWA Hiroyuki wrote:
> #
> # Overhead Command Shared Object Symbol
> # ........ ............... ........................ ......
> #
> 43.23% multi-fault-all [kernel] [k] smp_invalidate_interrupt
> 16.27% multi-fault-all [kernel] [k] flush_tlb_others_ipi
> 11.55% multi-fault-all [kernel] [k] _raw_spin_lock_irqsave
<========(*)
> 6.23% multi-fault-all [kernel] [k] intel_pmu_enable_all
> 2.17% multi-fault-all [kernel] [k] _raw_spin_unlock_irqrestore
Hmm.. The default rwsem implementation shouldn't have any spin-locks in
the fast-path. And your profile doesn't seem to have any scheduler
footprint, so I wonder what is going on.
Oh.
Lookie here:
- arch/x86/Kconfig.cpu:
config X86_XADD
def_bool y
depends on X86_32 && !M386
- arch/x86/Kconfig:
config RWSEM_GENERIC_SPINLOCK
def_bool !X86_XADD
config RWSEM_XCHGADD_ALGORITHM
def_bool X86_XADD
it looks like X86_XADD only gets enabled on 32-bit builds. Which means
that x86-64 in turn seems to end up always using the slower "generic
spinlock" version.
Are you sure this isn't the reason why your profiles are horrible?
Linus
--
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>