Can I do a regular read to simulate prefetch instruction?

From: John Smith
Date: Mon Jan 30 2006 - 12:23:50 EST


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:
Support we want to pre-read a skb buffer into the cache, what is the difference
between the following two methods, i.e. what is the different when using prefetch
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?

Thanks,

John


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/