aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2013-01-28 18:44:14 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-29 13:36:23 -0500
commitcd39a7890aed7433beb3188c7ad8591e260ebf10 (patch)
tree1a5de7566bbc4e1cb5f00495c664c27abc1085d4 /include
parent656a05c899b4026ee828ccddd550202ded7a26c6 (diff)
net: cacheline adjust struct netns_frags for better frag performance
This small cacheline adjustment of struct netns_frags improves performance significantly for the fragmentation code. Struct members 'lru_list' and 'mem' are both hot elements, and it hurts performance, due to cacheline bouncing at every call point, when they share a cacheline. Also notice, how mem is placed together with 'high_thresh' and 'low_thresh', as they are used in the compare operations together. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/inet_frag.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 32786a044718..91e77975eaa6 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -3,9 +3,12 @@
3 3
4struct netns_frags { 4struct netns_frags {
5 int nqueues; 5 int nqueues;
6 atomic_t mem;
7 struct list_head lru_list; 6 struct list_head lru_list;
8 7
8 /* Its important for performance to keep lru_list and mem on
9 * separate cachelines
10 */
11 atomic_t mem ____cacheline_aligned_in_smp;
9 /* sysctls */ 12 /* sysctls */
10 int timeout; 13 int timeout;
11 int high_thresh; 14 int high_thresh;