diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-29 03:07:38 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-04-05 20:05:06 +0200 |
commit | 687de7f1010cb819d04b768556960d3689abe02b (patch) | |
tree | c32a4ccac2d084d51e2074e7184598bf4cd37349 /fs/f2fs/super.c | |
parent | f2fs: write small sized IO to hot log (diff) | |
download | linux-687de7f1010cb819d04b768556960d3689abe02b.tar.xz linux-687de7f1010cb819d04b768556960d3689abe02b.zip |
f2fs: avoid IO split due to mixed WB_SYNC_ALL and WB_SYNC_NONE
If two threads try to flush dirty pages in different inodes respectively,
f2fs_write_data_pages() will produce WRITE and WRITE_SYNC one at a time,
resulting in a lot of 4KB seperated IOs.
So, this patch gives higher priority to WB_SYNC_ALL IOs and gathers write
IOs with a big WRITE_SYNC'ed bio.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 2e2e1b438ce1..21d5eaa2793e 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1566,6 +1566,8 @@ static void init_sb_info(struct f2fs_sb_info *sbi) for (i = 0; i < NR_COUNT_TYPE; i++) atomic_set(&sbi->nr_pages[i], 0); + atomic_set(&sbi->wb_sync_req, 0); + INIT_LIST_HEAD(&sbi->s_list); mutex_init(&sbi->umount_mutex); mutex_init(&sbi->wio_mutex[NODE]); |