Skip to content

Commit 27e8257

Browse files
edumazetkuba-moo
authored andcommitted
net: move sk_dst_pending_confirm and sk_pacing_status to sock_read_tx group
These two fields are mostly read in TCP tx path, move them in an more appropriate group for better cache locality. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20251124175013.1473655-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 3a6e8fd commit 27e8257

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/net/sock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,6 @@ struct sock {
481481
struct rb_root tcp_rtx_queue;
482482
};
483483
struct sk_buff_head sk_write_queue;
484-
u32 sk_dst_pending_confirm;
485-
u32 sk_pacing_status; /* see enum sk_pacing */
486484
struct page_frag sk_frag;
487485
struct timer_list sk_timer;
488486

@@ -493,6 +491,8 @@ struct sock {
493491
__cacheline_group_end(sock_write_tx);
494492

495493
__cacheline_group_begin(sock_read_tx);
494+
u32 sk_dst_pending_confirm;
495+
u32 sk_pacing_status; /* see enum sk_pacing */
496496
unsigned long sk_max_pacing_rate;
497497
long sk_sndtimeo;
498498
u32 sk_priority;

net/core/sock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4519,14 +4519,14 @@ static int __init sock_struct_check(void)
45194519
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_send_head);
45204520
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_write_queue);
45214521
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_write_pending);
4522-
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_dst_pending_confirm);
4523-
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_pacing_status);
45244522
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_frag);
45254523
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_timer);
45264524
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_pacing_rate);
45274525
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_zckey);
45284526
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_write_tx, sk_tskey);
45294527

4528+
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_read_tx, sk_dst_pending_confirm);
4529+
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_read_tx, sk_pacing_status);
45304530
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_read_tx, sk_max_pacing_rate);
45314531
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_read_tx, sk_sndtimeo);
45324532
CACHELINE_ASSERT_GROUP_MEMBER(struct sock, sock_read_tx, sk_priority);

0 commit comments

Comments
 (0)