浏览代码

[IA64] Prefetch mmap_sem in ia64_do_page_fault()

Take a hint from an x86_64 optimization by Arjan van de Ven and use it
for ia64.  See a9ba9a3b3897561d01e04cd21433746df46548c0

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 458f935527372499b714bf4f8e646a68bb0f52e3

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Christoph Lameter 19 年之前
父节点
当前提交
0ffe984917
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      arch/ia64/mm/fault.c

+ 3 - 0
arch/ia64/mm/fault.c

@@ -60,6 +60,9 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
 	struct siginfo si;
 	struct siginfo si;
 	unsigned long mask;
 	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..
 	 * If we're in an interrupt or have no user context, we must not take the fault..
 	 */
 	 */