Linux EXT4 FS development
 help / color / mirror / Atom feed
From: "Fengnan" <changfengnan@bytedance.com>
To: "Christian Brauner" <brauner@kernel.org>
Cc: "Christoph Hellwig" <hch@lst.de>,
	"Darrick J . Wong" <djwong@kernel.org>,
	 <linux-xfs@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
	 <linux-ext4@vger.kernel.org>, <tom.leiming@gmail.com>
Subject: Re: [PATCH] iomap: disable I/O polling when direct I/O must wait
Date: Wed, 2 Dec 2026 09:56:29 +0800	[thread overview]
Message-ID: <0afaa2fd-95d8-4b83-b863-bce2cc267ac4@bytedance.com> (raw)
In-Reply-To: <20261201-dagegen-dorthin-feinschliff-8edb53131611@brauner>

在 01/12/26 21:26, Christian Brauner 写道:
> On Tue, Dec 01, 2026 at 03:49:22AM +0000, Fengnan Chang wrote:
>> +	if (wait_for_completion)
>> +		iocb->ki_flags &= ~IOCB_HIPRI;
> 
> One question. wait_for_completion can also flip to true after we've
> already submitted, no?
> 
> * partial -EFAULT with IOMAP_DIO_PARTIAL
> * -ENOTBLK fallback
> 
> In both cases it's set after the iomap_iter() loop.
> 
> By then the first bio might have gone out with REQ_POLLED. Can't that
> end up in the same stall? I might misunderstand.
> 
Yes, you're right, thanks. Both the IOMAP_DIO_PARTIAL -EFAULT case and
the -ENOTBLK fallback set wait_for_completion after the iomap_iter()
loop, when the first bio may already have been submitted with
REQ_POLLED, so they can hit the same stall.

Clearing IOCB_HIPRI up front can't cover those. For v2 I plan to poll
from the wait loop instead, i.e. call iocb_bio_iopoll() while
iocb->private is set and fall back to blk_io_schedule() otherwise,
similar to what the loop did before sync polling was removed. That
covers the FORCE_WAIT case and both late paths. I'll send v2 after
testing it.

  reply	other threads:[~2026-12-02  1:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  3:49 [PATCH] iomap: disable I/O polling when direct I/O must wait Fengnan Chang
2026-12-01  4:06 ` sashiko-bot
2026-12-01  8:08 ` Christoph Hellwig
2026-12-01  8:48   ` Fengnan Chang
2026-12-01 13:25 ` Christian Brauner
2026-12-01 13:26 ` Christian Brauner
2026-12-02  1:56   ` Fengnan [this message]
2026-12-02  7:53     ` Fengnan
2026-12-02  8:19       ` sashiko-bot
2026-12-02  8:20       ` Christoph Hellwig
2026-12-02  8:43         ` changfengnan
2026-12-02  9:20         ` John Garry

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=0afaa2fd-95d8-4b83-b863-bce2cc267ac4@bytedance.com \
    --to=changfengnan@bytedance.com \
    --cc=brauner@kernel.org \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=tom.leiming@gmail.com \
    /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