[Top] [All Lists]

Re: Prefetches in memcpy

To: "Kevin D. Kissell" <>
Subject: Re: Prefetches in memcpy
From: Ralf Baechle <>
Date: Tue, 5 Nov 2002 17:29:35 +0100
Cc: Carsten Langgaard <>,
In-reply-to: <00fb01c284e6$5b7bf4f0$10eca8c0@grendel>; from on Tue, Nov 05, 2002 at 05:13:48PM +0100
Original-recipient: rfc822;
References: <> <> <00fb01c284e6$5b7bf4f0$10eca8c0@grendel>
User-agent: Mutt/
On Tue, Nov 05, 2002 at 05:13:48PM +0100, Kevin D. Kissell wrote:

> >  - Avoid prefetching beyond the end of the copy area in memcpy and memmove.
> >  - Introduce a second variant of memcpy that never does prefetching.  This
> >    one will be safe to use in KSEG1 / uncached XKPHYS also and will be used
> >    for memcpy_fromio, memcpy_toio and friends.
> Assuming we had a version that prefetched exactly to the end
> of the source memory block and no further, why would we need
> the second variant?

Because the source of memcpy_fromio and the destination of memcpy_toio are
some I/O address, typically something like a shared memory region on a
network card, which is accessed uncached.  The uncached address region
might be mapped in KSEG2/KSEG3 or accessed through an uncached region of
XKPHYS or KSEG1 where as I recall your statment the effect of prefetch
instructions is undefined.


<Prev in Thread] Current Thread [Next in Thread>