Is pmap_kextract() allowed to fault?

Jake Burkholder jake at locore.ca
Mon Apr 21 06:22:52 PDT 2003


Apparently, On Sun, Apr 20, 2003 at 10:53:32PM -0700,
	Marcel Moolenaar said words to the effect of;

> Gang,
> 
> On ia64 pmap_kextract() uses the tpa instruction which given a
> virtual address returns the physical address based on the
> translation registers and cache (ie TLB). This can fault when
> there's currently no mapping for the virtual address.
> 
> Since all other architectures have a non-faulting implementation
> (AFAICT), I'm a bit worried that we might get into trouble on
> ia64. I couldn't find anything about pmap_kextract(), so maybe
> anybody can enlighten me:
> 
> 1. Is pmap_kextract() allowed to fault?

It depends what kind of fault.  Will tpa fail if it causes a tlb fault
and the page is not in the vhpt (or whatever the fault handler searches),
or will it end up calling vm_fault and actually trying to fault in the
page?  pmap_extract/pmap_kextract are supposed to fail if the page is not
mapped by the pmap.

> 2. Is pmap_kextract() used often enough that using the cpu's TLB
>    is a possible performance speedup even if there are costly faults
>    that can sometimes happen?

I doubt it.

Jake


More information about the freebsd-hackers mailing list