Skip to content

Commit

Permalink
[IA64] Prefetch mmap_sem in ia64_do_page_fault()
Browse files Browse the repository at this point in the history
Take a hint from an x86_64 optimization by Arjan van de Ven and use it
for ia64.  See a9ba9a3

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

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Christoph Lameter authored and Tony Luck committed Apr 8, 2006
1 parent 8cab7cc commit 0ffe984
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/ia64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -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..
*/
Expand Down

0 comments on commit 0ffe984

Please sign in to comment.