Prefetch mmap_sem in ia64_do_page_fault()

From: Christoph Lameter <>
Date: 2006-03-29 17:54:38
Take a hint from an x86_64 optimization by Arjan van de Ven and use it
for ia64.


Prefetch the mmap_sem, which is critical for the performance of the page fault
handler. Maybe we can offset the damage done by the kprobes notifier?

Note: mm may be NULL but I guess that is safe. See;a=commit;h=458f935527372499b714bf4f8e646a68bb0f52e3

Signed-off-by: Christoph Lameter <>

Index: linux-2.6.16/arch/ia64/mm/fault.c
--- linux-2.6.16.orig/arch/ia64/mm/fault.c	2006-03-19 21:53:29.000000000 -0800
+++ linux-2.6.16/arch/ia64/mm/fault.c	2006-03-28 22:44:01.000000000 -0800
@@ -60,6 +60,9 @@ ia64_do_page_fault (unsigned long addres
 	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..
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Wed Mar 29 17:55:18 2006

This archive was generated by hypermail 2.1.8 : 2006-03-29 17:55:26 EST