public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: [email protected]
Subject: [PATCHSET 0.4] Reduce overhead of multishot recv/recvmsg
Date: Wed, 17 May 2023 13:11:59 -0600	[thread overview]
Message-ID: <[email protected]> (raw)

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



             reply	other threads:[~2023-05-17 19:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 19:11 Jens Axboe [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox