inet: frags: reorganize struct netns_frags
commit c2615cf5a761b32bf74e85bddc223dfff3d9b9f0 upstream. 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> [bwh: Backported to 4.4: adjust context] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
33990010ea
commit
29ff723c54
1 changed files with 5 additions and 4 deletions
|
@ -4,15 +4,16 @@
|
||||||
#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;
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue