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
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
>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
"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
>"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
"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
> 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
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
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?
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
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
11 matches
Mail list logo