diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2013-01-28 23:44:14 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-29 13:36:23 -0500 |
commit | cd39a7890aed7433beb3188c7ad8591e260ebf10 (patch) | |
tree | 1a5de7566bbc4e1cb5f00495c664c27abc1085d4 /include/net/inet_frag.h | |
parent | 656a05c899b4026ee828ccddd550202ded7a26c6 (diff) | |
download | blackbird-obmc-linux-cd39a7890aed7433beb3188c7ad8591e260ebf10.tar.gz blackbird-obmc-linux-cd39a7890aed7433beb3188c7ad8591e260ebf10.zip |
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/net/inet_frag.h')
-rw-r--r-- | include/net/inet_frag.h | 5 |
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 @@ struct netns_frags { int nqueues; - atomic_t mem; struct list_head lru_list; + /* Its important for performance to keep lru_list and mem on + * separate cachelines + */ + atomic_t mem ____cacheline_aligned_in_smp; /* sysctls */ int timeout; int high_thresh; |