aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2024-03-29 22:03:14 +0000
committerJakub Kicinski <[email protected]>2024-03-29 22:03:14 +0000
commit9494dc0b0860e5ca28a5cd5586cca3e171609fee (patch)
treeb8f7952bdc3936448e9ee4da907745b2f9c1a7f8 /net/sctp/socket.c
parentMerge branch 'address-remaining-wtautological-constant-out-of-range-compare' (diff)
parentnet: add sk_wake_async_rcu() helper (diff)
downloadkernel-9494dc0b0860e5ca28a5cd5586cca3e171609fee.tar.gz
kernel-9494dc0b0860e5ca28a5cd5586cca3e171609fee.zip
Merge branch 'udp-small-changes-on-receive-path'
Eric Dumazet says: ==================== udp: small changes on receive path This series is based on an observation I made in UDP receive path. The sock_def_readable() costs are pretty high, especially when epoll is used to generate EPOLLIN events. First patch annotates races on sk->sk_rcvbuf reads. Second patch replaces an atomic_add_return() with a less expensive atomic_add() Third patch avoids calling sock_def_readable() when possible. Fourth patch adds sk_wake_async_rcu() to get better inlining and code generation. ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index c67679a41044..e416b6d3d270 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -9276,7 +9276,7 @@ void sctp_data_ready(struct sock *sk)
if (skwq_has_sleeper(wq))
wake_up_interruptible_sync_poll(&wq->wait, EPOLLIN |
EPOLLRDNORM | EPOLLRDBAND);
- sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
+ sk_wake_async_rcu(sk, SOCK_WAKE_WAITD, POLL_IN);
rcu_read_unlock();
}