From: hanqi <hanqi@vivo.com>
To: Jens Axboe <axboe@kernel.dk>, jaegeuk@kernel.org, chao@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: f2fs supports uncached buffered I/O
Date: Wed, 16 Jul 2025 11:34:55 +0800 [thread overview]
Message-ID: <f7408161-eaef-47ed-8810-8c4e8f27bfc6@vivo.com> (raw)
In-Reply-To: <056e083b-8e41-45a2-9b0f-2ec47d1a9f71@kernel.dk>
在 2025/7/15 22:28, Jens Axboe 写道:
> On 7/14/25 9:10 PM, Qi Han wrote:
>> Jens has already completed the development of uncached buffered I/O
>> in git [1], and in f2fs, the feature can be enabled simply by setting
>> the FOP_DONTCACHE flag in f2fs_file_operations.
> You need to ensure that for any DONTCACHE IO that the completion is
> routed via non-irq context, if applicable. I didn't verify that this is
> the case for f2fs. Generally you can deduce this as well through
> testing, I'd say the following cases would be interesting to test:
>
> 1) Normal DONTCACHE buffered read
> 2) Overwrite DONTCACHE buffered write
> 3) Append DONTCACHE buffered write
>
> Test those with DEBUG_ATOMIC_SLEEP set in your config, and it that
> doesn't complain, that's a great start.
>
> For the above test cases as well, verify that page cache doesn't grow as
> IO is performed. A bit is fine for things like meta data, but generally
> you want to see it remain basically flat in terms of page cache usage.
>
> Maybe this is all fine, like I said I didn't verify. Just mentioning it
> for completeness sake.
Hi, Jens
Thanks for your suggestion. As I mentioned earlier in [1], in f2fs,
the regular buffered write path invokes folio_end_writeback from a
softirq context. Therefore, it seems that f2fs may not be suitable
for DONTCACHE I/O writes.
I’d like to ask a question: why is DONTCACHE I/O write restricted to
non-interrupt context only? Is it because dropping the page might be
too time-consuming to be done safely in interrupt context? This might
be a naive question, but I’d really appreciate your clarification.
Thanks in advance.
[1] https://lore.kernel.org/all/137c0a07-ea0a-48fa-acc4-3e0ec63681f4@vivo.com/
>
next prev parent reply other threads:[~2025-07-16 3:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 3:10 Qi Han
2025-07-15 6:58 ` Chao Yu
2025-07-15 8:14 ` hanqi
2025-07-15 14:28 ` Jens Axboe
2025-07-16 3:34 ` hanqi [this message]
2025-07-16 3:43 ` Jens Axboe
2025-07-16 8:27 ` hanqi
2025-07-24 13:09 ` Chao Yu
2025-07-25 1:44 ` hanqi
2025-07-25 2:37 ` Chao Yu
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=f7408161-eaef-47ed-8810-8c4e8f27bfc6@vivo.com \
--to=hanqi@vivo.com \
--cc=axboe@kernel.dk \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®