diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-07-25 14:16:21 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-08-01 21:52:36 +0300 |
commit | fd8c8caf7e7c8261a92ce0f7f2cd0adb8afd9e0d (patch) | |
tree | f538e2fbc1c2f2ff34e239f0b9b46d8f7103dbcd /fs/f2fs/node.c | |
parent | ad6672bbc527727dc8968e8d92687f55ae928ce5 (diff) | |
download | linux-fd8c8caf7e7c8261a92ce0f7f2cd0adb8afd9e0d.tar.xz |
f2fs: let checkpoint flush dnode page of regular
Fsyncer will wait on all dnode pages of regular writeback before flushing,
if there are async dnode pages blocked by IO scheduler, it may decrease
fsync's performance.
In this patch, we choose to let f2fs_balance_fs_bg() to trigger checkpoint
to flush these dnode pages of regular, so async IO of dnode page can be
elimitnated, making fsyncer only need to wait for sync IO.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 9d9f4c9750c4..6055d2d12640 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1410,6 +1410,10 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING))) goto redirty_out; + if (wbc->sync_mode == WB_SYNC_NONE && + IS_DNODE(page) && is_cold_node(page)) + goto redirty_out; + /* get old block addr of this node page */ nid = nid_of_node(page); f2fs_bug_on(sbi, page->index != nid); @@ -1727,10 +1731,12 @@ continue_unlock: } if (step < 2) { + if (wbc->sync_mode == WB_SYNC_NONE && step == 1) + goto out; step++; goto next_step; } - +out: if (nwritten) f2fs_submit_merged_write(sbi, NODE); |