]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] x86_64: prefetch the mmap_sem in the fault path
authorArjan van de Ven <arjan@intel.linux.com>
Sat, 25 Mar 2006 15:30:10 +0000 (16:30 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 25 Mar 2006 17:10:54 +0000 (09:10 -0800)
commit2c411e87666af81de44911f51b8fff0ffc244a38
treed222fb0e1c522d4bd506cb8c24c498a7e1589da2
parentee53ee179dcf4744baf8c79db27edd78507b8fcd
[PATCH] x86_64: prefetch the mmap_sem in the fault path

In a micro-benchmark that stresses the pagefault path, the down_read_trylock
on the mmap_sem showed up quite high on the profile. Turns out this lock is
bouncing between cpus quite a bit and thus is cache-cold a lot. This patch
prefetches the lock (for write) as early as possible (and before some other
somewhat expensive operations). With this patch, the down_read_trylock
basically fell out of the top of profile.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/mm/fault.c