On 1/30/06, John Smith <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I find out some network card drivers (e.g. e1000 driver) use prefetch
> instruction to reduce memory access latency and speed up data operation.
>
> My question is:
> Suppose we want to pre-read a skb buffer into the cache, what is the
> difference between using prefetch instruction and using a regular read
> opertation?
> 1. use prefetch instruction to stimulate a pre-fetch of the skb address,
>     e.g. prefetch(skb);
> 2. use an assignment statement to stimulate a pre-fetch of the skb address,
>     e.g. skb1 = skb;
>
> I was told the data will be prefetched into a so-called prefetching queue
> only by using prefetching instruction. Is this true?

prefetch won't stall the processor while data is fetched, i don't know
of any "queue" as the data is fetched into cache.  See the
optimization manual at
http://www.intel.com/design/pentium4/manuals/index_new.htm

using prefetch is a difficult thing, as some recent threads on netdev
should give you some more insight.

Jesse
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to