public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCHSET 0.4] Reduce overhead of multishot recv/recvmsg
@ 2023-05-17 19:11 Jens Axboe
  2023-05-17 19:12 ` [PATCH 1/4] io_uring/net: initialize struct msghdr more sanely for io_recv() Jens Axboe
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jens Axboe @ 2023-05-17 19:11 UTC (permalink / raw)
  To: io-uring

Hi,

With the way that the multishot variants of recv and recvmsg currently
work, we always end up doing two sock_recvmsg() call for each subsequent
receive outside of the initial receive. That is obviously extra overhead,
and to make matters worse, that also involves picking and recycling an
appropriate buffer for those operations.

For protocols that sanely pass back whether a socket has more data
after a receive, we can rely on that hint to avoid iterating over
recvmsg/buffers an extra time per receive.

Patches 1..3 are prep patches, patch 4 has the logic mentioned above.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-17 19:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17 19:11 [PATCHSET 0.4] Reduce overhead of multishot recv/recvmsg Jens Axboe
2023-05-17 19:12 ` [PATCH 1/4] io_uring/net: initialize struct msghdr more sanely for io_recv() Jens Axboe
2023-05-17 19:12 ` [PATCH 2/4] io_uring/net: initalize msghdr->msg_inq to known value Jens Axboe
2023-05-17 19:12 ` [PATCH 3/4] io_uring/net: push IORING_CQE_F_SOCK_NONEMPTY into io_recv_finish() Jens Axboe
2023-05-17 19:12 ` [PATCH 4/4] io_uring/net: don't retry recvmsg() unnecessarily Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox