diff options
| author | Eric Dumazet <edumazet@google.com> | 2025-08-28 10:27:38 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-08-29 19:29:24 -0700 |
| commit | 95fa78830e5b2eb2041174c7f9549c746e003dd6 (patch) | |
| tree | 61e4192b22fe88910082096dcf0e76e3d84e19d3 /scripts/gdb/linux/modules.py | |
| parent | 9529320ad64e614cfaf96e6b8e3d8c0a1245160c (diff) | |
inet_diag: avoid cache line misses in inet_diag_bc_sk()
inet_diag_bc_sk() pulls five cache lines per socket,
while most filters only need the two first ones.
Add three booleans to struct inet_diag_dump_data,
that are selectively set if a filter needs specific socket fields.
- mark_needed /* INET_DIAG_BC_MARK_COND present. */
- cgroup_needed /* INET_DIAG_BC_CGROUP_COND present. */
- userlocks_needed /* INET_DIAG_BC_AUTO present. */
This removes millions of cache lines misses per ss invocation
when simple filters are specified on busy servers.
offsetof(struct sock, sk_userlocks) = 0xf3
offsetof(struct sock, sk_mark) = 0x20c
offsetof(struct sock, sk_cgrp_data) = 0x298
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250828102738.2065992-6-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions
