Commit c2615cf5 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

inet: frags: reorganize struct netns_frags

Put the read-mostly fields in a separate cache line
at the beginning of struct netns_frags, to reduce
false sharing noticed in inet_frag_kill()
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5d672a0
...@@ -5,16 +5,17 @@ ...@@ -5,16 +5,17 @@
#include <linux/rhashtable.h> #include <linux/rhashtable.h>
struct netns_frags { struct netns_frags {
struct rhashtable rhashtable ____cacheline_aligned_in_smp;
/* Keep atomic mem on separate cachelines in structs that include it */
atomic_long_t mem ____cacheline_aligned_in_smp;
/* sysctls */ /* sysctls */
long high_thresh; long high_thresh;
long low_thresh; long low_thresh;
int timeout; int timeout;
int max_dist; int max_dist;
struct inet_frags *f; struct inet_frags *f;
struct rhashtable rhashtable ____cacheline_aligned_in_smp;
/* Keep atomic mem on separate cachelines in structs that include it */
atomic_long_t mem ____cacheline_aligned_in_smp;
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment