Prefetch mmap_sem in ia64_do_page_fault()

From: Christoph Lameter <clameter_at_sgi.com>
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.

See http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a9ba9a3b3897561d01e04cd21433746df46548c0

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 
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=458f935527372499b714bf4f8e646a68bb0f52e3

Signed-off-by: Christoph Lameter <clameter@sgi.com>

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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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