diff options
| author | Eric Dumazet <edumazet@google.com> | 2025-06-30 12:35:39 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-07-03 00:22:02 +0300 |
| commit | 83081337419cb692eca4ee475d936b1fdcfd49f6 (patch) | |
| tree | 306d7b12294131e5db495b773f9eb5bbddb936cf /include/net/aligned_data.h | |
| parent | 998642e999d23324c5dbf38149606d09cec2c377 (diff) | |
| download | linux-83081337419cb692eca4ee475d936b1fdcfd49f6.tar.xz | |
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 <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250630093540.3052835-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
| -rw-r--r-- | include/net/aligned_data.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/aligned_data.h b/include/net/aligned_data.h index 5c7badf71f04..bedb4f86b0fe 100644 --- a/include/net/aligned_data.h +++ b/include/net/aligned_data.h @@ -11,6 +11,9 @@ */ struct net_aligned_data { atomic64_t net_cookie ____cacheline_aligned_in_smp; +#if defined(CONFIG_INET) + atomic_long_t tcp_memory_allocated ____cacheline_aligned_in_smp; +#endif }; extern struct net_aligned_data net_aligned_data; |
