f2fs: fix min_seq_blocks can not make sense in some scenes.
authorLaibin Qiu <qiulaibin@huawei.com>
Sat, 31 Jul 2021 03:26:46 +0000 (11:26 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 2 Aug 2021 18:24:26 +0000 (11:24 -0700)
F2FS have dirty page count control for batched sequential
write in writepages, and get the value of min_seq_blocks by
blocks_per_seg * segs_per_sec(segs_per_sec defaults to 1).
But in some scenes we set a lager section size, Min_seq_blocks
will become too large to achieve the expected effect(eg. 4thread
sequential write, the number of merge requests will be reduced).

Signed-off-by: Laibin Qiu <qiulaibin@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c

index f9b7fb7..0f976ce 100644 (file)
@@ -5159,7 +5159,7 @@ int f2fs_build_segment_manager(struct f2fs_sb_info *sbi)
                sm_info->ipu_policy = 1 << F2FS_IPU_FSYNC;
        sm_info->min_ipu_util = DEF_MIN_IPU_UTIL;
        sm_info->min_fsync_blocks = DEF_MIN_FSYNC_BLOCKS;
-       sm_info->min_seq_blocks = sbi->blocks_per_seg * sbi->segs_per_sec;
+       sm_info->min_seq_blocks = sbi->blocks_per_seg;
        sm_info->min_hot_blocks = DEF_MIN_HOT_BLOCKS;
        sm_info->min_ssr_sections = reserved_sections(sbi);