aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2013-01-28 18:44:49 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-29 13:36:23 -0500
commit6e34a8b37aca63f109bf990d46131ee07206f5f1 (patch)
tree2daf8bc157035e3493636eea48db3805a2a92f3f /include/net
parent5f8e1e8b767bdb8e471d4f49612b88c606f8811e (diff)
net: cacheline adjust struct inet_frag_queue
Fragmentation code cacheline adjusting of struct inet_frag_queue. Take advantage of the size of struct timer_list, and move all but spinlock_t lock, below the timer struct. On 64-bit 'lru_list', 'list' and 'refcnt', fits exactly into the next cacheline, and a new cacheline starts at 'fragments'. The netns_frags *net pointer is moved to the end of the struct, because its used in a compare, with "next/close-by" elements of which this struct is embedded into. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/inet_frag.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 54c1de781c68..8e4c42523f59 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -16,12 +16,11 @@ struct netns_frags {
16}; 16};
17 17
18struct inet_frag_queue { 18struct inet_frag_queue {
19 struct hlist_node list;
20 struct netns_frags *net;
21 struct list_head lru_list; /* lru list member */
22 spinlock_t lock; 19 spinlock_t lock;
23 atomic_t refcnt;
24 struct timer_list timer; /* when will this queue expire? */ 20 struct timer_list timer; /* when will this queue expire? */
21 struct list_head lru_list; /* lru list member */
22 struct hlist_node list;
23 atomic_t refcnt;
25 struct sk_buff *fragments; /* list of received fragments */ 24 struct sk_buff *fragments; /* list of received fragments */
26 struct sk_buff *fragments_tail; 25 struct sk_buff *fragments_tail;
27 ktime_t stamp; 26 ktime_t stamp;
@@ -34,6 +33,8 @@ struct inet_frag_queue {
34#define INET_FRAG_LAST_IN 1 33#define INET_FRAG_LAST_IN 1
35 34
36 u16 max_size; 35 u16 max_size;
36
37 struct netns_frags *net;
37}; 38};
38 39
39#define INETFRAGS_HASHSZ 64 40#define INETFRAGS_HASHSZ 64