RE: Prefetch mmap_sem in ia64_do_page_fault()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christoph Lameter wrote on Tuesday, March 28, 2006 10:55 PM
> 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 
> 
> +	/* mmap_sem is performance critical.... */
> +	prefetchw(&mm->mmap_sem);
> +

I would say push that a couple of lines down after checking !mm

        if (in_atomic() || !mm)
                goto no_context;

If you insist on prefetching mmap_sem at the very beginning of the
function, then use speculative load, it will "nat" right away with
null pointer without generating any exception at all.  It is super
fast because of nat page.

- Ken
-
: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux