aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/neighbour.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-11-11 01:57:19 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-11 13:29:40 -0500
commit46b13fc5c0f239f36e84665c73087d5fa86bfd86 (patch)
tree435ef8301a89c04f56b305b219ddcece068bb273 /include/net/neighbour.h
parentc0c04c2a89cf6363da2940da59afd2e30001b991 (diff)
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/net/neighbour.h')
-rw-r--r--include/net/neighbour.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 55590ab16b3e..815b2ce9f4a4 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -96,16 +96,16 @@ struct neighbour {
96 struct neigh_parms *parms; 96 struct neigh_parms *parms;
97 unsigned long confirmed; 97 unsigned long confirmed;
98 unsigned long updated; 98 unsigned long updated;
99 __u8 flags; 99 rwlock_t lock;
100 __u8 nud_state;
101 __u8 type;
102 __u8 dead;
103 atomic_t refcnt; 100 atomic_t refcnt;
104 struct sk_buff_head arp_queue; 101 struct sk_buff_head arp_queue;
105 struct timer_list timer; 102 struct timer_list timer;
106 unsigned long used; 103 unsigned long used;
107 atomic_t probes; 104 atomic_t probes;
108 rwlock_t lock; 105 __u8 flags;
106 __u8 nud_state;
107 __u8 type;
108 __u8 dead;
109 seqlock_t ha_lock; 109 seqlock_t ha_lock;
110 unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; 110 unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))];
111 struct hh_cache *hh; 111 struct hh_cache *hh;