summaryrefslogtreecommitdiff
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-06-04 18:20:36 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2018-06-05 00:33:20 +0300
commitc29fd0c0e26dacb7a33ad166587059818a94b4e0 (patch)
tree6a25f17833047796fccde3cd7c4e17d35199e640 /fs/f2fs/file.c
parentaae764ece6076b0852b95943c40748569c7b8585 (diff)
downloadlinux-c29fd0c0e26dacb7a33ad166587059818a94b4e0.tar.xz
f2fs: let sync node IO interrupt async one
Although mixed sync/async IOs can have continuous LBA, as they have different IO priority, block IO scheduler will add them into different queues and commit them separately, result in splited IOs which causes wrose performance. This patch gives high priority to synchronous IO of nodes, means that once synchronous flow starts, it can interrupt asynchronous writeback flow of system flusher, so more big IOs can be expected. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 74c326442565..16fd50abbf40 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -274,7 +274,9 @@ go_write:
goto out;
}
sync_nodes:
+ atomic_inc(&sbi->wb_sync_req[NODE]);
ret = f2fs_fsync_node_pages(sbi, inode, &wbc, atomic);
+ atomic_dec(&sbi->wb_sync_req[NODE]);
if (ret)
goto out;