Re: [perf-discuss] prefetch data for page fault

2007-09-24 Thread johansen
Agreed. At page fault time, we still have no idea whether the access was random or sequential. I suspect that there would only be a benefit to prefetching if we could detect that we're going access the next N cache-lines sequentially. Even that seems like it could be more trouble than it's worth

Re: [perf-discuss] prefetch data for page fault

2007-09-24 Thread Roch Bourbonnais
Moreover, even if you'd find a way, wouldn't that save something < 1 usec of the 1 millisec pagefault ? A big contortion to get 0.1% improvement. I'm sure engineering time can be better spent. Le 24 sept. 07 à 20:55, [EMAIL PROTECTED] a écrit : >>My means is not prefetch the page but u

Re: [perf-discuss] prefetch data for page fault

2007-09-24 Thread johansen
>My means is not prefetch the page but use prefetch instruction > >(e.g. __asm__ __volatile__( " prefetchnta %0" : : "m" (*addr) ) ;// >addr is fist parameter of pagefault handler, which caused page fault >trap), prefetch the content in the addr into cache line. Let me reite

Re: [perf-discuss] prefetch data for page fault

2007-09-21 Thread love_code meta
"I don't understand how you would prefetch this page from the kernel space" " My means is not prefetch the page but use prefetch instruction (e.g. __asm__ __volatile__( " prefetchnta %0" : : "m" (*addr) ) ;// addr is fist parameter of pagefault handler, which caused page fault trap), prefe

Re: [perf-discuss] prefetch data for page fault

2007-09-21 Thread johansen
>"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

Re: [perf-discuss] prefetch data for page fault

2007-09-20 Thread love_code meta
"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 pag

Re: [perf-discuss] prefetch data for page fault

2007-09-20 Thread Peter Damron
> 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 th

Re: [perf-discuss] prefetch data for page fault

2007-09-20 Thread love_code meta
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 do

Re: [perf-discuss] prefetch data for page fault

2007-09-20 Thread Wee Yeh Tan
On 9/18/07, love_code meta <[EMAIL PROTECTED]> wrote: > After mapping virtual memory, then access data in memory, we know that > will generate page fault trap if no physical memory page available. > Is it beneficial that before resuming user program we pre-fetch the addr > which caused page fault?

Re: [perf-discuss] prefetch data for page fault

2007-09-18 Thread Rayson Ho
Did you try using large pages?? Rayson On 9/18/07, love_code meta <[EMAIL PROTECTED]> wrote: > Hi all > After mapping virtual memory, then access data in memory, we know that > will generate page fault trap if no physical memory page available. > Is it beneficial that before resuming user progr

[perf-discuss] prefetch data for page fault

2007-09-17 Thread love_code meta
Hi all After mapping virtual memory, then access data in memory, we know that will generate page fault trap if no physical memory page available. Is it beneficial that before resuming user program we pre-fetch the addr which caused page fault? Thanks, Ma Ling