Linux-f2fs-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Yongpeng Yang <monty_pavel@sina.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Yongpeng Yang <yangyongpeng@xiaomi.com>,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v2 3/3] f2fs: optimize NAT block loading during checkpoint write
Date: Tue, 20 Jan 2026 20:32:35 +0800	[thread overview]
Message-ID: <a7a81c52-a047-4f2c-b397-8116aeb169c0@kernel.org> (raw)
In-Reply-To: <20260113152138.15979-5-monty_pavel@sina.com>

On 1/13/2026 11:23 PM, Yongpeng Yang wrote:
> From: Yongpeng Yang <yangyongpeng@xiaomi.com>
> 
> Under stress tests with frequent metadata operations, checkpoint write
> time can become excessively long. Analysis shows that the slowdown is
> caused by synchronous, one-by-one reads of NAT blocks during checkpoint
> processing.
> 
> The issue can be reproduced with the following workload:
> 1. seq 1 650000 | xargs -P 16 -n 1 touch
> 2. sync # avoid checkpoint write during deleting
> 3. delete 1 file every 455 files
> 4. echo 3 > /proc/sys/vm/drop_caches
> 5. sync # trigger checkpoint write
> 
> This patch submits read I/O for all NAT blocks required in the
> __flush_nat_entry_set() phase in advance, reducing the overhead of
> synchronous waiting for individual NAT block reads.
> 
> The NAT block flush latency before and after the change is as below:
> 
> |             |NAT blocks accessed|NAT blocks read|Flush time (ms)|
> |-------------|-------------------|---------------|---------------|
> |Before change|1205               |1191           |158            |
> |After change |1264               |1242           |11             |
> 
> With a similar number of NAT blocks accessed and read from disk, adding
> NAT block readahead reduces the total NAT block flush time by more than
> 90%.
> 
> Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2026-01-20 12:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13 15:21 [f2fs-dev] [PATCH v2 0/3] f2fs: reduce checkpoint write latency under metadata-intensive workloads Yongpeng Yang
2026-01-13 15:21 ` [f2fs-dev] [PATCH v2 1/3] f2fs: add write latency stats for NAT and SIT blocks in f2fs_write_checkpoint Yongpeng Yang
2026-01-20 12:27   ` Chao Yu via Linux-f2fs-devel
2026-01-13 15:21 ` [f2fs-dev] [PATCH v2 2/3] f2fs: change size parameter of __has_cursum_space() to unsigned int Yongpeng Yang
2026-01-20 12:27   ` Chao Yu via Linux-f2fs-devel
2026-01-13 15:23 ` [f2fs-dev] [PATCH v2 3/3] f2fs: optimize NAT block loading during checkpoint write Yongpeng Yang
2026-01-20 12:32   ` Chao Yu via Linux-f2fs-devel [this message]
2026-01-22 23:50 ` [f2fs-dev] [PATCH v2 0/3] f2fs: reduce checkpoint write latency under metadata-intensive workloads patchwork-bot+f2fs--- via Linux-f2fs-devel

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=a7a81c52-a047-4f2c-b397-8116aeb169c0@kernel.org \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=monty_pavel@sina.com \
    --cc=yangyongpeng@xiaomi.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