IO-Uring Archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org
Subject: [PATCHSET 0/2] Multishot read tweaks
Date: Mon,  1 Apr 2024 11:49:14 -0600	[thread overview]
Message-ID: <20240401175306.1051122-1-axboe@kernel.dk> (raw)

Hi,

We can't properly support multishot reads unless one of the following
conditions are true:

1) The file supports proper FMODE_NOWAIT
2) Barring proper FMODE_NOWAIT support, the file must be opened in
   non-blocking O_NONBLOCK mode

Without either one of those, non-blocking retries cannot be attempted.
And without that, it's pointless to support multishot reads.

If this is attempted, fall back to singleshot mode. This will properly
do the initial CQE posting, but will not set IORING_CQE_F_MORE as we
can't reliably perform the retries that multishot requires.

 io_uring/io_uring.c | 13 +++++++++----
 io_uring/rw.c       |  9 ++++++++-
 2 files changed, 17 insertions(+), 5 deletions(-)

-- 
Jens Axboe


             reply	other threads:[~2024-04-01 17:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 17:49 Jens Axboe [this message]
2024-04-01 17:49 ` [PATCH 1/2] io_uring/rw: don't allow multishot reads without NOWAIT support Jens Axboe
2024-04-01 17:49 ` [PATCH 2/2] io_uring: disable io-wq execution of multishot NOWAIT requests 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 \
    --in-reply-to=20240401175306.1051122-1-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).