diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-03-22 05:23:45 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-24 15:10:50 -0400 |
commit | 648d50ba12c805d3fc75105ede7af254b3349dbd (patch) | |
tree | 4efe2862ac68aa102ed46a03307e4a426456166a /fs/f2fs/debug.c | |
parent | 30a61ddf8117c26ac5b295e1233eaa9629a94ca3 (diff) |
f2fs: show the max number of volatile operations
This patch adds to show the max number of volatile operations which are
conducting concurrently.
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 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index ef1179df05d9..0baa3ee39392 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c | |||
@@ -51,7 +51,9 @@ static void update_general_status(struct f2fs_sb_info *sbi) | |||
51 | si->ndirty_all = sbi->ndirty_inode[DIRTY_META]; | 51 | si->ndirty_all = sbi->ndirty_inode[DIRTY_META]; |
52 | si->inmem_pages = get_pages(sbi, F2FS_INMEM_PAGES); | 52 | si->inmem_pages = get_pages(sbi, F2FS_INMEM_PAGES); |
53 | si->aw_cnt = atomic_read(&sbi->aw_cnt); | 53 | si->aw_cnt = atomic_read(&sbi->aw_cnt); |
54 | si->vw_cnt = atomic_read(&sbi->vw_cnt); | ||
54 | si->max_aw_cnt = atomic_read(&sbi->max_aw_cnt); | 55 | si->max_aw_cnt = atomic_read(&sbi->max_aw_cnt); |
56 | si->max_vw_cnt = atomic_read(&sbi->max_vw_cnt); | ||
55 | si->nr_wb_cp_data = get_pages(sbi, F2FS_WB_CP_DATA); | 57 | si->nr_wb_cp_data = get_pages(sbi, F2FS_WB_CP_DATA); |
56 | si->nr_wb_data = get_pages(sbi, F2FS_WB_DATA); | 58 | si->nr_wb_data = get_pages(sbi, F2FS_WB_DATA); |
57 | if (SM_I(sbi) && SM_I(sbi)->fcc_info) | 59 | if (SM_I(sbi) && SM_I(sbi)->fcc_info) |
@@ -337,8 +339,10 @@ static int stat_show(struct seq_file *s, void *v) | |||
337 | seq_printf(s, " - IO (CP: %4d, Data: %4d, Flush: %4d, Discard: %4d)\n", | 339 | seq_printf(s, " - IO (CP: %4d, Data: %4d, Flush: %4d, Discard: %4d)\n", |
338 | si->nr_wb_cp_data, si->nr_wb_data, | 340 | si->nr_wb_cp_data, si->nr_wb_data, |
339 | si->nr_flush, si->nr_discard); | 341 | si->nr_flush, si->nr_discard); |
340 | seq_printf(s, " - inmem: %4d, atomic IO: %4d (Max. %4d)\n", | 342 | seq_printf(s, " - inmem: %4d, atomic IO: %4d (Max. %4d), " |
341 | si->inmem_pages, si->aw_cnt, si->max_aw_cnt); | 343 | "volatile IO: %4d (Max. %4d)\n", |
344 | si->inmem_pages, si->aw_cnt, si->max_aw_cnt, | ||
345 | si->vw_cnt, si->max_vw_cnt); | ||
342 | seq_printf(s, " - nodes: %4d in %4d\n", | 346 | seq_printf(s, " - nodes: %4d in %4d\n", |
343 | si->ndirty_node, si->node_pages); | 347 | si->ndirty_node, si->node_pages); |
344 | seq_printf(s, " - dents: %4d in dirs:%4d (%4d)\n", | 348 | seq_printf(s, " - dents: %4d in dirs:%4d (%4d)\n", |
@@ -438,7 +442,9 @@ int f2fs_build_stats(struct f2fs_sb_info *sbi) | |||
438 | atomic_set(&sbi->inplace_count, 0); | 442 | atomic_set(&sbi->inplace_count, 0); |
439 | 443 | ||
440 | atomic_set(&sbi->aw_cnt, 0); | 444 | atomic_set(&sbi->aw_cnt, 0); |
445 | atomic_set(&sbi->vw_cnt, 0); | ||
441 | atomic_set(&sbi->max_aw_cnt, 0); | 446 | atomic_set(&sbi->max_aw_cnt, 0); |
447 | atomic_set(&sbi->max_vw_cnt, 0); | ||
442 | 448 | ||
443 | mutex_lock(&f2fs_stat_mutex); | 449 | mutex_lock(&f2fs_stat_mutex); |
444 | list_add_tail(&si->stat_list, &f2fs_stat_list); | 450 | list_add_tail(&si->stat_list, &f2fs_stat_list); |