All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>, io-uring@vger.kernel.org
Subject: Re: __io_file_supports_nowait for regular files
Date: Fri, 22 Jul 2022 17:59:12 +0200	[thread overview]
Message-ID: <20220722155912.GA10020@lst.de> (raw)
In-Reply-To: <6a8f5175-fd42-b114-b512-99c0edd9ebaf@kernel.dk>

On Thu, Jul 21, 2022 at 12:46:16PM -0600, Jens Axboe wrote:
> Looking a bit deeper at this, FMODE_NOWAIT is about the file.

Yes.

> The nowait
> check for the bdev is about whether the driver honors NOWAIT
> submissions. Any blk-mq driver will be fine, bio based ones probably
> not. You could very well end up blocking off the submit path in that
> case.

But do these submissions even matter for the high level interface?
We'd get -EAGAIN way more often without them (or all the time
for direct I/O), but does that strictly matter for the interface?

Note that for mny file systems (at least btrfs, f2fs and xfs) just
checking s_bdev is not enough any way as they can use multiple block
devices.

I'm also a little confused now that I'm looking more into this,
as iomap only uses REQ_NOWAIT for polled direct I/O to start with.
The legacy direct I/O code uses it for all writes as long as
IOCB_NOWAIT is set, so it seems like only the block device code
really makes extensive and most likely correct use of the
REQ_NOWAIT flag anyway.

      reply	other threads:[~2022-07-22 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 15:37 __io_file_supports_nowait for regular files Christoph Hellwig
2022-07-21 15:59 ` Jens Axboe
2022-07-21 16:23   ` Christoph Hellwig
2022-07-21 18:46     ` Jens Axboe
2022-07-22 15:59       ` Christoph Hellwig [this message]

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=20220722155912.GA10020@lst.de \
    --to=hch@lst.de \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.