From: Chao Yu <chao@kernel.org>
To: Wenjie Qi <qwjhust@gmail.com>, jaegeuk@kernel.org
Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, qiwenjie@xiaomi.com
Subject: Re: [PATCH v2] f2fs: skip direct I/O iostat context when disabled
Date: Tue, 16 Jun 2026 11:16:03 +0800 [thread overview]
Message-ID: <d9db27f3-3328-4490-b8a7-292d76b017d2@kernel.org> (raw)
In-Reply-To: <20260616030655.111933-1-qiwenjie@xiaomi.com>
On 6/16/26 11:06, Wenjie Qi wrote:
> F2FS iostat is optional and is disabled by default. Direct I/O still
> allocates and binds a bio_iostat_ctx, updates the submit timestamp, and
> replaces bi_end_io for every DIO bio even when sbi->iostat_enable is
> false.
>
> The byte accounting calls do not need an extra guard because
> f2fs_update_iostat() already checks sbi->iostat_enable. Only skip the
> DIO bio context setup when iostat is disabled. If iostat is enabled
> through sysfs before submission, the existing context allocation and
> latency accounting path is still used.
>
> QEMU benchmark on a 1GiB F2FS virtio-blk image, with iostat_enable=0,
> 4KiB O_DIRECT I/O over a 64MiB file, 50000 iterations per run:
>
> baseline patched
> direct_read median 65264.50 ns 55470.95 ns
> direct_read recheck 65553.75 ns 55470.95 ns
> direct_write median 68054.62 ns 56309.44 ns
> direct_write recheck 66873.51 ns 56309.44 ns
>
> Signed-off-by: Wenjie Qi <qiwenjie@xiaomi.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
next prev parent reply other threads:[~2026-06-16 3:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 3:06 Wenjie Qi
2026-06-16 3:16 ` Chao Yu [this message]
2026-06-17 14:30 ` [f2fs-dev] " patchwork-bot+f2fs
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=d9db27f3-3328-4490-b8a7-292d76b017d2@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=qiwenjie@xiaomi.com \
--cc=qwjhust@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
Powered by JetHome