mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
998642e999
commit
8308133741
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user