]> git.baikalelectronics.ru Git - kernel.git/commitdiff
[IA64] Prefetch mmap_sem in ia64_do_page_fault()
authorChristoph Lameter <clameter@sgi.com>
Wed, 29 Mar 2006 06:54:38 +0000 (22:54 -0800)
committerTony Luck <tony.luck@intel.com>
Sat, 8 Apr 2006 06:08:16 +0000 (23:08 -0700)
Take a hint from an x86_64 optimization by Arjan van de Ven and use it
for ia64.  See 2c411e87666af81de44911f51b8fff0ffc244a38

Prefetch the mmap_sem, which is critical for the performance of the page fault
handler.

Note: mm may be NULL but I guess that is safe.
See e611cc67cd543a18746a57c50e27894fb44f8dc7

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/mm/fault.c

index af7eb087dca7af7df598e8c81c475e9b365f042c..d98ec49570b80f6e9d70a66d98e070ef19cc3dba 100644 (file)
@@ -60,6 +60,9 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
        struct siginfo si;
        unsigned long mask;
 
+       /* mmap_sem is performance critical.... */
+       prefetchw(&mm->mmap_sem);
+
        /*
         * If we're in an interrupt or have no user context, we must not take the fault..
         */