From: Andrew Morton <akpm@linux-foundation.org>
To: Liu Wei <liuwei09@cestc.cn>
Cc: willy@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/filemap: invalidating pages is still necessary when io with IOCB_NOWAIT
Date: Thu, 23 May 2024 13:08:02 -0700 [thread overview]
Message-ID: <20240523130802.730d2790b8e5f691871575c0@linux-foundation.org> (raw)
In-Reply-To: <20240513132339.26269-1-liuwei09@cestc.cn>
On Mon, 13 May 2024 21:23:39 +0800 Liu Wei <liuwei09@cestc.cn> wrote:
> After commit (6be96d3ad3 fs: return if direct I/O will trigger writeback),
> when we issuing AIO with direct I/O and IOCB_NOWAIT on a block device, the
> process context will not be blocked.
>
> However, if the device already has page cache in memory, EAGAIN will be
> returned. And even when trying to reissue the AIO with direct I/O and
> IOCB_NOWAIT again, we consistently receive EAGAIN.
>
> Maybe a better way to deal with it: filemap_fdatawrite_range dirty pages
> with WB_SYNC_NONE flag, and invalidate_mapping_pages unmapped pages at
> the same time.
Can't userspace do this? If EAGAIN, sync the fd and retry the IO?
next prev parent reply other threads:[~2024-05-23 20:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 13:23 Liu Wei
2024-05-23 20:08 ` Andrew Morton [this message]
2024-05-23 21:11 ` Matthew Wilcox
2024-05-23 21:17 ` Jens Axboe
2024-05-23 21:08 ` Matthew Wilcox
2024-05-23 21:16 ` Jens Axboe
2024-05-27 10:09 ` Liu Wei
2024-05-27 15:36 ` Jens Axboe
2024-05-30 2:33 ` Liu Wei
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=20240523130802.730d2790b8e5f691871575c0@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuwei09@cestc.cn \
--cc=willy@infradead.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
all inboxes | Powered by JetHome®