-----BEGIN PGP SIGNED MESSAGE-----
>>>>> "rick" == rick jones <rick.jones2@xxxxxx> writes:
>> - NIC receives packet. - Tells target CPU to prefetch RX
>> descriptor and headers. - CPU later looks at them and doesn't
>> have to wait a for a cache miss.
>> Drawback is that you would need to tell the NIC in advance on
>> which CPU you want to process the packet, but with Linux IRQ
>> affinity that's easy to figure out.
rick> With all the interrupt avoidance that is going-on these days,
rick> would prefetching in the driver be sufficient? Presumably the
rick> driver is going to be processing multiple packets at a time on
rick> an interrupt/etc so having it issue prefetches in SW would
rick> seem to help with all but the very first packet.
I did prefetching of subsequent descriptor rings in the 200Mhz days,
when the descriptors lived in the NIC card. It's rather hard to write in
I did prefetching of packets on a PowerPC system (actually, it was
inside a TOE-like device, living in a Linux 1U). This was done with
altivec instructions, and was rather easy.
On Intel, one can use MMX or floating point instructions to do the
The interrupt avoidance mechanism actually makes the prefetch easier,
since you are already in the bottom half, so it is easier to do.
The question is: how much to prefetch?
BTW: in 1996 the IETF IPv6 WG briefly toyed with the idea of swapping
the source and destination addresses in the IPv6 header. Having
the dst first reduces a cache miss. They decided not to do this.
] Michael Richardson Xelerance Corporation, Ottawa, ON | firewalls [
] mcr @ xelerance.com Now doing IPsec training, see |net architect[
] http://www.sandelman.ca/mcr/ www.xelerance.com/training/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Finger me for keys
-----END PGP SIGNATURE-----