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>
This commit is contained in:
Chao Yu
2018-06-04 23:20:36 +08:00
committed by Jaegeuk Kim
parent aae764ece6
commit c29fd0c0e2
7 changed files with 37 additions and 9 deletions

View File

@@ -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;