diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-11-11 11:46:46 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-11-26 18:53:56 -0500 |
commit | 02b16d0a34a188a21d08be52b37505e531aa558a (patch) | |
tree | 4c5e793f91f92c05742ac16a07f05ad564611b56 /fs/f2fs/debug.c | |
parent | b61ac5b720146c619c7cdf17eff2551b934399e5 (diff) |
f2fs: add to account direct IO
This patch adds f2fs_dio_submit_bio() to hook submit_io/end_io functions
in direct IO path, in order to account DIO.
Later, we will add this count into is_idle() to let background GC/Discard
thread be aware of DIO.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r-- | fs/f2fs/debug.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 0ba662315d93..1f1230f690ec 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c | |||
@@ -53,6 +53,8 @@ static void update_general_status(struct f2fs_sb_info *sbi) | |||
53 | si->vw_cnt = atomic_read(&sbi->vw_cnt); | 53 | si->vw_cnt = atomic_read(&sbi->vw_cnt); |
54 | si->max_aw_cnt = atomic_read(&sbi->max_aw_cnt); | 54 | si->max_aw_cnt = atomic_read(&sbi->max_aw_cnt); |
55 | si->max_vw_cnt = atomic_read(&sbi->max_vw_cnt); | 55 | si->max_vw_cnt = atomic_read(&sbi->max_vw_cnt); |
56 | si->nr_dio_read = get_pages(sbi, F2FS_DIO_READ); | ||
57 | si->nr_dio_write = get_pages(sbi, F2FS_DIO_WRITE); | ||
56 | si->nr_wb_cp_data = get_pages(sbi, F2FS_WB_CP_DATA); | 58 | si->nr_wb_cp_data = get_pages(sbi, F2FS_WB_CP_DATA); |
57 | si->nr_wb_data = get_pages(sbi, F2FS_WB_DATA); | 59 | si->nr_wb_data = get_pages(sbi, F2FS_WB_DATA); |
58 | si->nr_rd_data = get_pages(sbi, F2FS_RD_DATA); | 60 | si->nr_rd_data = get_pages(sbi, F2FS_RD_DATA); |
@@ -374,6 +376,8 @@ static int stat_show(struct seq_file *s, void *v) | |||
374 | seq_printf(s, " - Inner Struct Count: tree: %d(%d), node: %d\n", | 376 | seq_printf(s, " - Inner Struct Count: tree: %d(%d), node: %d\n", |
375 | si->ext_tree, si->zombie_tree, si->ext_node); | 377 | si->ext_tree, si->zombie_tree, si->ext_node); |
376 | seq_puts(s, "\nBalancing F2FS Async:\n"); | 378 | seq_puts(s, "\nBalancing F2FS Async:\n"); |
379 | seq_printf(s, " - DIO (R: %4d, W: %4d)\n", | ||
380 | si->nr_dio_read, si->nr_dio_write); | ||
377 | seq_printf(s, " - IO_R (Data: %4d, Node: %4d, Meta: %4d\n", | 381 | seq_printf(s, " - IO_R (Data: %4d, Node: %4d, Meta: %4d\n", |
378 | si->nr_rd_data, si->nr_rd_node, si->nr_rd_meta); | 382 | si->nr_rd_data, si->nr_rd_node, si->nr_rd_meta); |
379 | seq_printf(s, " - IO_W (CP: %4d, Data: %4d, Flush: (%4d %4d %4d), " | 383 | seq_printf(s, " - IO_W (CP: %4d, Data: %4d, Flush: (%4d %4d %4d), " |