diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-11 06:57:19 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-11 10:29:40 -0800 |
commit | 46b13fc5c0f239f36e84665c73087d5fa86bfd86 (patch) | |
tree | 435ef8301a89c04f56b305b219ddcece068bb273 /include | |
parent | c0c04c2a89cf6363da2940da59afd2e30001b991 (diff) | |
download | kernel_samsung_smdk4412-46b13fc5c0f239f36e84665c73087d5fa86bfd86.zip kernel_samsung_smdk4412-46b13fc5c0f239f36e84665c73087d5fa86bfd86.tar.gz kernel_samsung_smdk4412-46b13fc5c0f239f36e84665c73087d5fa86bfd86.tar.bz2 |
neigh: reorder struct neighbour
It is important to move nud_state outside of the often modified cache
line (because of refcnt), to reduce false sharing in neigh_event_send()
This is a followup of commit 0ed8ddf4045f (neigh: Protect neigh->ha[]
with a seqlock)
This gives a 7% speedup on routing test with IP route cache disabled.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/neighbour.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 55590ab..815b2ce 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -96,16 +96,16 @@ struct neighbour { struct neigh_parms *parms; unsigned long confirmed; unsigned long updated; - __u8 flags; - __u8 nud_state; - __u8 type; - __u8 dead; + rwlock_t lock; atomic_t refcnt; struct sk_buff_head arp_queue; struct timer_list timer; unsigned long used; atomic_t probes; - rwlock_t lock; + __u8 flags; + __u8 nud_state; + __u8 type; + __u8 dead; seqlock_t ha_lock; unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; struct hh_cache *hh; |