David S. Miller a écrit :
From: jamal <[EMAIL PROTECTED]>
Date: Wed, 07 Dec 2005 16:37:10 -0500
I think there is value for prefetch - just not the way the current patch
has it. Something less adventorous as suggested by Robert would make a
lot more sense.
Looking at the e1000 patch in question again, it may be doing a little
bit too much prefetching, even for my taste. Just prefetching at
skb->data when receiving a packet is probably about right.
If I read the e1000 patch correct, it prefetches the 2nd, 3rd, etc.
packets processed in a RX run twice. Once as the "next_skb" and then
again when it is "skb".
In fact, if next_skb is still being DMA'd by the device this could
cause some L2 cache ping-pong between the PCI controller and the
cpu.
So yes, I would definitely advocate for something simpler and less
aggressive.
I totally agree with you David.
I suspect one prefetch(skb->data) should be OK.
The problem with prefetches is :
If you add one prefetch somewhere in the kernel : good results for the path
including the prefetch... micro benchmarks are happy...
If you add 10.000 prefetches, you endup with a far more larger kernel and
suffer from icache misses penalties.
Another try could be to do some benchmarks about NET_IP_ALIGN being a valid
optimization nowadays :
Maybe setting it to 0 in e1000 driver could give better results.
Could somebody give it a try ?
Eric
-
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