Re: [RFC] skb align patch
From: David Miller <davem@davemloft.net>
Date: 2009-09-22 05:29:22
From: Eric Dumazet <redacted> Date: Tue, 22 Sep 2009 05:20:53 +0200
Oh I see, you want to optimize the rx (NIC has to do a DMA to write packet into host memory and this DMA could be a read /modify/write if address is not aligned, instead of a pure write), while I tried to align skb to optimize the pktgen tx (NIC has to do a DMA to read packet from host), and align the skb had no effect.
This is a problem with these kinds of changes. This patch from Stephen came out of a presentation and discussion at netconf where the Intel folks showed that if they did a combination of things it improved NUMA forwarding numbers a lot. So you couldn't just do NUMA spreading of RX queue memory, or just do this ALIGN patch, or just eliminate the false sharing from statistics updates. You had to do all three to start seeing forwarding rates go up. So don't worry, this is getting us somewhere to where improvement shows, but individually each change won't trigger it. The alignment in this patch is a real big deal for 64 byte forwarding tests, where the entire packet is a whole PCI-E cacheline. But not if it isn't aligned properly.