RE: Prefetch mmap_sem in ia64_do_page_fault()

From: Chen, Kenneth W <kenneth.w.chen_at_intel.com>
Date: 2006-03-29 18:31:42
Christoph Lameter wrote on Tuesday, March 28, 2006 11:16 PM
> > 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.
> 
> I saw David Mosberger's patch from last year
> 
> http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=458f935527372499b714bf4f8e646a68bb0f52e3
> 
> and it seems that he implemented fast handling of these NULL cases?

I know about that patch and I'm referring in the context of that commit:

ld8.s r1=[r0]      - immediate nat generation, no fault
lfetch.fault [r0]  - generate nat page consumption because lfetch is not
                     considered as a speculative access.

The nat page consumption fault handler should be rather quick, though cpu
still have to fault into the handler, muck around with ipsr.ed bit and
then rfi.  What I'm saying is there is an even *faster* way of doing
prefetch.

> mm == NULL is very rare so I think we can try to prefetch as 
> early as possible.

Yeah, sure. Looks good!

- Ken
-
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 18:31:31 2006

This archive was generated by hypermail 2.1.8 : 2006-03-29 18:31:41 EST