]> nv-tegra.nvidia Code Review - linux-2.6.git/commit
[NET]: Reorder some hot fields of struct net_device
authorEric Dumazet <dada1@cosmosbay.com>
Tue, 27 Sep 2005 22:23:16 +0000 (15:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Sep 2005 22:23:16 +0000 (15:23 -0700)
commit9356b8fc07dc126cd91d2b12f314d760ab48996e
tree908b193442d0e2ad345c05547d227809bc162a0a
parent2d7ceece08ad940d0ceac98ab1b5a3b82dfc2a0a
[NET]: Reorder some hot fields of struct net_device

Place them on separate cache lines in SMP to lower memory bouncing
between multiple CPU accessing the device.

     - One part is mostly used on receive path (including
       eth_type_trans()) (poll_list, poll, quota, weight, last_rx,
       dev_addr, broadcast)

     - One part is mostly used on queue transmit path (qdisc)
      (queue_lock, qdisc, qdisc_sleeping, qdisc_list, tx_queue_len)

     - One part is mostly used on xmit path (device)
      (xmit_lock, xmit_lock_owner, priv, hard_start_xmit, trans_start)

'features' is placed outside of these hot points, in a location that
may be shared by all cpus (because mostly read)

name_hlist is moved close to name[IFNAMSIZ] to speedup __dev_get_by_name()

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