<PRE>
> <div>Sorry for my obscure description.</div>  <div>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.</div>  <div>It
> maybe benificial when the system
> dosn't touch the memory before user programe
> re-access the addr. </div>

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.
</PRE>
 
 
This message posted from opensolaris.org
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to