> 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 <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
