net: shrinks struct net_device
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 16 Sep 2010 02:58:13 +0000 (02:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Sep 2010 04:58:44 +0000 (21:58 -0700)
commitcd13539b8bc9ae884e6d8d9374c594adff4304e4
tree6adc13bc1dfe5da2480f5d2186e2719f5f2b713f
parent94767632623c7bf5b16a0cf963ec93a8ad9acca4
net: shrinks struct net_device

commit ab95bfe01 (net: replace hooks in __netif_receive_skb) added
rx_handler at wrong place, between two cache line aligned objects,
creating a big hole (a full cache line)

Move rx_handler and rx_handler_data before rx_queue, filling existing
hole.

Move master field in the cache line(s) used in receive path.

This saves 64 bytes (or L1_CACHE_BYTES), and avoids two possible
cache misses in receive path.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h