]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: skb_shared_info optimization
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 5 Jun 2009 04:04:16 +0000 (04:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jun 2009 07:21:48 +0000 (00:21 -0700)
commit042a53a9e437feaf2230dd2cadcecfae9c7bfe05
treeae9078f61e390a3014aecb3fe80d3438ab25ee51
parenteae3f29cc73f83cc3f1891d3ad40021b5172c630
net: skb_shared_info optimization

skb_dma_unmap() is quite expensive for small packets,
because we use two different cache lines from skb_shared_info.

One to access nr_frags, one to access dma_maps[0]

Instead of dma_maps being an array of MAX_SKB_FRAGS + 1 elements,
let dma_head alone in a new dma_head field, close to nr_frags,
to reduce cache lines misses.

Tested on my dev machine (bnx2 & tg3 adapters), nice speedup !

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c
drivers/net/e1000/e1000_main.c
drivers/net/e1000e/netdev.c
drivers/net/igb/igb_main.c
drivers/net/igbvf/netdev.c
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/tg3.c
include/linux/skbuff.h
net/core/skb_dma_map.c