mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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] f2fs: skip inode folio lookup for cached overwrite
Date: Mon, 15 Jun 2026 18:43:47 +0800	[thread overview]
Message-ID: <a7b36a47-0556-4805-8934-c57def57c3d2@kernel.org> (raw)
In-Reply-To: <20260529022924.3655519-1-qiwenjie@xiaomi.com>

On 5/29/26 10:29, Wenjie Qi wrote:
> prepare_write_begin() first gets the inode folio and builds a dnode,
> then checks the read extent cache. For an ordinary overwrite of a
> non-inline and non-compressed file, an extent-cache hit already gives the
> data block address and the following path does not need to allocate or
> update any node state.
> 
> Check the read extent cache before fetching the inode folio for that
> narrow case. Keep the existing paths for inline data, compressed files,
> and writes that may extend past EOF, where the helper may need inline
> conversion, compression preparation, or block reservation.
> 
> This avoids a node-folio lookup in the buffered overwrite fast path when
> the mapping is already cached.
> 
> In a QEMU/KASAN x86_64 VM, using a small buffered overwrite workload on
> an existing 1MiB file, median time improved as follows:
> 
>   64-byte overwrites:  1724.93 ns/write -> 1560.24 ns/write
>   256-byte overwrites: 1713.38 ns/write -> 1577.85 ns/write
> 
> Function profiling of 20k 64-byte overwrites showed
> f2fs_get_inode_folio() calls drop from 20004 to 4.
> 
> Signed-off-by: Wenjie Qi <qiwenjie@xiaomi.com>

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

Thanks,

  reply	other threads:[~2026-06-15 10:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  2:29 Wenjie Qi
2026-06-15 10:43 ` Chao Yu [this message]
2026-06-15 15: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=a7b36a47-0556-4805-8934-c57def57c3d2@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

all inboxes | Powered by JetHome®