]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: allow out-place-update for direct IO in LFS mode
authorChao Yu <yuchao0@huawei.com>
Thu, 27 Sep 2018 10:34:52 +0000 (18:34 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 1 Oct 2018 01:42:50 +0000 (18:42 -0700)
commiteb4c4111a43be5267db38c9da71ff98c2d3e14b6
tree030956a695c5806406fab3571511d93bed2f6381
parent222c3077ffe25ecebc99d045a5ef2f21ed2b3e16
f2fs: allow out-place-update for direct IO in LFS mode

Normally, DIO uses in-pllace-update, but in LFS mode, f2fs doesn't
allow triggering any in-place-update writes, so we fallback direct
write to buffered write, result in bad performance of large size
write.

This patch adds to support triggering out-place-update for direct IO
to enhance its performance.

Note that it needs to exclude direct read IO during direct write,
since new data writing to new block address will no be valid until
write finished.

storage: zram

time xfs_io -f -d /mnt/f2fs/file -c "pwrite 0 1073741824" -c "fsync"

Before:
real 0m13.061s
user 0m0.327s
sys 0m12.486s

After:
real 0m6.448s
user 0m0.228s
sys 0m6.212s

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/file.c