summaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-11-15 11:02:39 -0800
committerDavid S. Miller <davem@davemloft.net>2021-11-16 13:10:34 +0000
commit91b6d325635617540b6a1646ddb138bb17cbd569 (patch)
treef4bb42d5c9f0ae67c51618aaf2364feb014516d9 /net/ipv4/udp.c
parent6c302e799a0d4be1362f505453b714fe05d91f2a (diff)
downloadlinux-91b6d325635617540b6a1646ddb138bb17cbd569.tar.gz
linux-91b6d325635617540b6a1646ddb138bb17cbd569.tar.bz2
linux-91b6d325635617540b6a1646ddb138bb17cbd569.zip
net: cache align tcp_memory_allocated, tcp_sockets_allocated
tcp_memory_allocated and tcp_sockets_allocated often share a common cache line, source of false sharing. Also take care of udp_memory_allocated and mptcp_sockets_allocated. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 0e2f1c05da28..7101e6d892d6 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -122,7 +122,7 @@ EXPORT_SYMBOL(udp_table);
long sysctl_udp_mem[3] __read_mostly;
EXPORT_SYMBOL(sysctl_udp_mem);
-atomic_long_t udp_memory_allocated;
+atomic_long_t udp_memory_allocated ____cacheline_aligned_in_smp;
EXPORT_SYMBOL(udp_memory_allocated);
#define MAX_UDP_PORTS 65536