diff options
| author | Eric Dumazet <edumazet@google.com> | 2025-10-17 16:37:12 +0300 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-10-21 16:56:21 +0300 |
| commit | 3ff9bcecce83f12169ab3e42671bd76554ca521a (patch) | |
| tree | db362844461ecef320cd31a69cd3121b533c8618 /scripts/checkstack.pl | |
| parent | d1d7998df9d7d3ee20bcfc876065fa897b11506d (diff) | |
| download | linux-3ff9bcecce83f12169ab3e42671bd76554ca521a.tar.xz | |
net: avoid extra access to sk->sk_wmem_alloc in sock_wfree()
UDP TX packets destructor is sock_wfree().
It suffers from a cache line bouncing in sock_def_write_space_wfree().
Instead of reading sk->sk_wmem_alloc after we just did an atomic RMW
on it, use __refcount_sub_and_test() to get the old value for free,
and pass the new value to sock_def_write_space_wfree().
Add __sock_writeable() helper.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20251017133712.2842665-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions
