]> www.infradead.org Git - users/jedix/linux-maple.git/commit
f2fs: add write priority option based on zone UFS
authorLiao Yuanhong <liaoyuanhong@vivo.com>
Mon, 15 Jul 2024 12:34:51 +0000 (20:34 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 5 Aug 2024 20:18:35 +0000 (20:18 +0000)
commit8444ce524947daf441546b5b3a0c418706dade35
treeaa6df60e452d1143212db34287bdeac3582d1948
parent50438dbc483ca6a133d2bce9d5d6747bcee38371
f2fs: add write priority option based on zone UFS

Currently, we are using a mix of traditional UFS and zone UFS to support
some functionalities that cannot be achieved on zone UFS alone. However,
there are some issues with this approach. There exists a significant
performance difference between traditional UFS and zone UFS. Under normal
usage, we prioritize writes to zone UFS. However, in critical conditions
(such as when the entire UFS is almost full), we cannot determine whether
data will be written to traditional UFS or zone UFS. This can lead to
significant performance fluctuations, which is not conducive to
development and testing. To address this, we have added an option
zlu_io_enable under sys with the following three modes:
1) zlu_io_enable == 0:Normal mode, prioritize writing to zone UFS;
2) zlu_io_enable == 1:Zone UFS only mode, only allow writing to zone UFS;
3) zlu_io_enable == 2:Traditional UFS priority mode, prioritize writing to
traditional UFS.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Signed-off-by: Wu Bo <bo.wu@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/ABI/testing/sysfs-fs-f2fs
fs/f2fs/f2fs.h
fs/f2fs/segment.c
fs/f2fs/super.c
fs/f2fs/sysfs.c