> "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.
I don't understand how you would prefetch this page from the kernel space. The page is mapped into the application's address space, not the kernel's. There is no mechanism to prefetch a page that isn't mapped into the address space of the executing context. As a further wrinkle, there's no guarantee that when you return from the pagefault trap you'll be executing the application that caused the pagefault. trap_rtt() makes a call to preempt(), scheduling a different process on CPU. -j _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org