summaryrefslogtreecommitdiff
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-09-22 17:55:28 -0700
committerJakub Kicinski <kuba@kernel.org>2025-09-22 17:55:29 -0700
commit3afb106f3f9aa81c512ec5c7e2f7e1c01a2a6e6b (patch)
treebc451903057d70cba7a4f02c83921cb341a109ac /include/net/sock.h
parent4238cbf6ee27cd158e7407e4fef36088028a7b86 (diff)
parent649091ef597bb7de34dd8ceea39bbc4252970558 (diff)
downloadlinux-next-3afb106f3f9aa81c512ec5c7e2f7e1c01a2a6e6b.tar.gz
linux-next-3afb106f3f9aa81c512ec5c7e2f7e1c01a2a6e6b.zip
Merge branch 'tcp-move-few-fields-for-data-locality'
Eric Dumazet says: ==================== tcp: move few fields for data locality After recent additions (PSP and AccECN) I wanted to make another round on fields locations to increase data locality. This series manages to shrink TCP and TCPv6 objects by 128 bytes, but more importantly should reduce number of touched cache lines in TCP fast paths. There is more to come. v2: removed tcp CACHELINE_ASSERT_GROUP_SIZE after a kernel build bot reported an error. ==================== Link: https://patch.msgid.link/20250919204856.2977245-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index ee95081b0c0b..b4fefeea0213 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -467,7 +467,7 @@ struct sock {
__cacheline_group_begin(sock_write_tx);
int sk_write_pending;
atomic_t sk_omem_alloc;
- int sk_sndbuf;
+ int sk_err_soft;
int sk_wmem_queued;
refcount_t sk_wmem_alloc;
@@ -492,6 +492,9 @@ struct sock {
long sk_sndtimeo;
u32 sk_priority;
u32 sk_mark;
+ kuid_t sk_uid;
+ u16 sk_protocol;
+ u16 sk_type;
struct dst_entry __rcu *sk_dst_cache;
netdev_features_t sk_route_caps;
#ifdef CONFIG_SOCK_VALIDATE_XMIT
@@ -504,6 +507,7 @@ struct sock {
unsigned int sk_gso_max_size;
gfp_t sk_allocation;
u32 sk_txhash;
+ int sk_sndbuf;
u8 sk_pacing_shift;
bool sk_use_task_frag;
__cacheline_group_end(sock_read_tx);
@@ -517,15 +521,11 @@ struct sock {
sk_no_check_tx : 1,
sk_no_check_rx : 1;
u8 sk_shutdown;
- u16 sk_type;
- u16 sk_protocol;
unsigned long sk_lingertime;
struct proto *sk_prot_creator;
rwlock_t sk_callback_lock;
- int sk_err_soft;
u32 sk_ack_backlog;
u32 sk_max_ack_backlog;
- kuid_t sk_uid;
unsigned long sk_ino;
spinlock_t sk_peer_lock;
int sk_bind_phc;