mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
vsock: report pending receive data to io_uring
AF_VSOCK stream receives never fill msghdr.msg_inq, so io_uring cannot set IORING_CQE_F_SOCK_NONEMPTY and retries a multishot receive even after the queue has been drained. Fill the hint at the common receive exit using the transport callback that SIOCINQ already uses, and report 1 once the connection is finished so the caller performs the receive which observes EOF, as TCP does after a FIN. A vsock loopback ping-pong with io_uring multishot receive drops entries into __vsock_connectible_recvmsg from 1.97 to 1.00 per delivered message, and receiver CPU time by about 3% (25 runs of 50000 messages, p=0.006). Signed-off-by: David Carlier <devnexen@gmail.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Link: https://patch.msgid.link/20260923184008.153541-2-devnexen@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
df2d695617
commit
608e7f8496
1 changed files with 35 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue