diff options
| author | Eric Dumazet <[email protected]> | 2025-06-30 09:35:39 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-07-02 21:22:02 +0000 |
| commit | 83081337419cb692eca4ee475d936b1fdcfd49f6 (patch) | |
| tree | 306d7b12294131e5db495b773f9eb5bbddb936cf /net/mptcp/protocol.c | |
| parent | net: move net_cookie into net_aligned_data (diff) | |
| download | kernel-83081337419cb692eca4ee475d936b1fdcfd49f6.tar.gz kernel-83081337419cb692eca4ee475d936b1fdcfd49f6.zip | |
tcp: move tcp_memory_allocated into net_aligned_data
____cacheline_aligned_in_smp attribute only makes sure to align
a field to a cache line. It does not prevent the linker to use
the remaining of the cache line for other variables, causing
potential false sharing.
Move tcp_memory_allocated into a dedicated cache line.
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/mptcp/protocol.c')
| -rw-r--r-- | net/mptcp/protocol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index e7972e633236..5f904fc5ac4c 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -11,6 +11,7 @@ #include <linux/netdevice.h> #include <linux/sched/signal.h> #include <linux/atomic.h> +#include <net/aligned_data.h> #include <net/sock.h> #include <net/inet_common.h> #include <net/inet_hashtables.h> @@ -3729,7 +3730,7 @@ static struct proto mptcp_prot = { .stream_memory_free = mptcp_stream_memory_free, .sockets_allocated = &mptcp_sockets_allocated, - .memory_allocated = &tcp_memory_allocated, + .memory_allocated = &net_aligned_data.tcp_memory_allocated, .per_cpu_fw_alloc = &tcp_memory_per_cpu_fw_alloc, .memory_pressure = &tcp_memory_pressure, |
