summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWenjie Qi <qwjhust@gmail.com>2026-05-29 05:29:24 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2026-06-22 22:52:36 +0300
commit222bc257a151cc1b01d926199a0d5a7ba61d2e53 (patch)
tree7ffbfb6c6197fadacdf07bbc7b7fc0e8f3ab9c94 /scripts
parent6d874b65aadce56ac78f76129dbcfc2599b638f8 (diff)
downloadlinux-222bc257a151cc1b01d926199a0d5a7ba61d2e53.tar.xz
f2fs: skip inode folio lookup for cached overwrite
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> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions