"The system thread handling the page fault
might not know the actual address
that the program was trying to access,
and thus the system thread might
not know which cache line to prefetch.
"
  The virtual address is as first parameter for pagefault function.
   
  "The system thread handling the page fault
also might not be running on the same cpu or core
as the user thread,
and thus the prefetch might not go to
the correct cache"
  Yes ,it is possible sometime.
   
  "The user program would have trouble
doing the prefetch,
because it is often difficult to predict
where page faults will happen
and because a prefetch before
the page fault will probably have no effect.
"
  The prefetch instruciton will execute in kernel space.
   
  we add prefetch instruciton in pagefault handler after successfully geting 
physical memory ,becasuse we know the user programe will soon access the 
address  again. 
  
Thanks,
  Ma Ling
Peter Damron <[EMAIL PROTECTED]> wrote:
  

> Sorry for my obscure description.
  My
> means is when we return from pagefault trap, whether
> we may use prefetch instruction to load
> the addr into cache in advance, because we
> know it has been in physcal memory and the
> user programe will re-access the addr.
  It
> maybe benificial when the system
> dosn't touch the memory before user programe
> re-access the addr. 


It could be a good idea,
but there are some possible difficulties.

The system thread handling the page fault
might not know the actual address
that the program was trying to access,
and thus the system thread might
not know which cache line to prefetch.

The system thread handling the page fault
also might not be running on the same cpu or core
as the user thread,
and thus the prefetch might not go to
the correct cache.

The user program would have trouble
doing the prefetch,
because it is often difficult to predict
where page faults will happen
and because a prefetch before
the page fault will probably have no effect.

Peter.

P.S. Sorry for the bad formatting, but I don't know how to turn off the 
horrible formatter.




This message posted from opensolaris.org
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org


       
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to