diff options
author | Eric Dumazet <edumazet@google.com> | 2018-10-10 12:30:04 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-18 09:13:25 +0200 |
commit | 5b68fda0a455be7f48fdf97407de1aa09d046fdd (patch) | |
tree | b11361d995ae6f43850a4902aecaa9554ec8311d | |
parent | 6060bcdcffaba68c3ff158a88faab6df27210ffc (diff) |
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: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit c2615cf5a761b32bf74e85bddc223dfff3d9b9f0)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | include/net/inet_frag.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index dea175f3418a..f47678d2ccc2 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -4,16 +4,17 @@ #include <linux/rhashtable.h> 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 */ long high_thresh; long low_thresh; int timeout; int max_dist; 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; }; /** |