diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-03-25 17:19:58 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-04-05 11:05:02 -0700 |
commit | 8b8dd65f72ccbf7111eb97c4c4f5b5df2a412a07 (patch) | |
tree | 541a512839ed2dd7775d94e81a976efe9841bc48 /fs/f2fs/debug.c | |
parent | c13ff37e359bb3eacf4e1760dcea8d9760aa7459 (diff) | |
download | talos-obmc-linux-8b8dd65f72ccbf7111eb97c4c4f5b5df2a412a07.tar.gz talos-obmc-linux-8b8dd65f72ccbf7111eb97c4c4f5b5df2a412a07.zip |
f2fs: show issued flush/discard count
Show historical count of flush command and discard command.
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 | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 0baa3ee39392..f27e66ea7ff3 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c @@ -56,12 +56,18 @@ static void update_general_status(struct f2fs_sb_info *sbi) si->max_vw_cnt = atomic_read(&sbi->max_vw_cnt); si->nr_wb_cp_data = get_pages(sbi, F2FS_WB_CP_DATA); si->nr_wb_data = get_pages(sbi, F2FS_WB_DATA); - if (SM_I(sbi) && SM_I(sbi)->fcc_info) - si->nr_flush = - atomic_read(&SM_I(sbi)->fcc_info->submit_flush); - if (SM_I(sbi) && SM_I(sbi)->dcc_info) - si->nr_discard = - atomic_read(&SM_I(sbi)->dcc_info->submit_discard); + if (SM_I(sbi) && SM_I(sbi)->fcc_info) { + si->nr_flushed = + atomic_read(&SM_I(sbi)->fcc_info->issued_flush); + si->nr_flushing = + atomic_read(&SM_I(sbi)->fcc_info->issing_flush); + } + if (SM_I(sbi) && SM_I(sbi)->dcc_info) { + si->nr_discarded = + atomic_read(&SM_I(sbi)->dcc_info->issued_discard); + si->nr_discarding = + atomic_read(&SM_I(sbi)->dcc_info->issing_discard); + } si->total_count = (int)sbi->user_block_count / sbi->blocks_per_seg; si->rsvd_segs = reserved_segments(sbi); si->overp_segs = overprovision_segments(sbi); @@ -336,9 +342,11 @@ static int stat_show(struct seq_file *s, void *v) seq_printf(s, " - Inner Struct Count: tree: %d(%d), node: %d\n", si->ext_tree, si->zombie_tree, si->ext_node); seq_puts(s, "\nBalancing F2FS Async:\n"); - seq_printf(s, " - IO (CP: %4d, Data: %4d, Flush: %4d, Discard: %4d)\n", + seq_printf(s, " - IO (CP: %4d, Data: %4d, Flush: (%4d %4d), " + "Discard: (%4d %4d))\n", si->nr_wb_cp_data, si->nr_wb_data, - si->nr_flush, si->nr_discard); + si->nr_flushing, si->nr_flushed, + si->nr_discarding, si->nr_discarded); seq_printf(s, " - inmem: %4d, atomic IO: %4d (Max. %4d), " "volatile IO: %4d (Max. %4d)\n", si->inmem_pages, si->aw_cnt, si->max_aw_cnt, |