diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-09-29 06:31:28 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-09-30 21:33:34 -0400 |
commit | 274bd9ba39425610fdb9a6827602197a5cd27cd8 (patch) | |
tree | 9f0502bf4cbc4364a61a1553ec96c5bd0d767975 /fs/f2fs/debug.c | |
parent | b63e7be5908cb757fc6b98fb9534dabd78b5338a (diff) |
f2fs: add to account skip count of background GC
This patch adds to account skip count of background GC, and show stat
info via 'status' debugfs entry.
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 da1cabbc4973..75bc62edc4c1 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c | |||
@@ -101,6 +101,8 @@ static void update_general_status(struct f2fs_sb_info *sbi) | |||
101 | si->avail_nids = NM_I(sbi)->available_nids; | 101 | si->avail_nids = NM_I(sbi)->available_nids; |
102 | si->alloc_nids = NM_I(sbi)->nid_cnt[PREALLOC_NID]; | 102 | si->alloc_nids = NM_I(sbi)->nid_cnt[PREALLOC_NID]; |
103 | si->bg_gc = sbi->bg_gc; | 103 | si->bg_gc = sbi->bg_gc; |
104 | si->io_skip_bggc = sbi->io_skip_bggc; | ||
105 | si->other_skip_bggc = sbi->other_skip_bggc; | ||
104 | si->skipped_atomic_files[BG_GC] = sbi->skipped_atomic_files[BG_GC]; | 106 | si->skipped_atomic_files[BG_GC] = sbi->skipped_atomic_files[BG_GC]; |
105 | si->skipped_atomic_files[FG_GC] = sbi->skipped_atomic_files[FG_GC]; | 107 | si->skipped_atomic_files[FG_GC] = sbi->skipped_atomic_files[FG_GC]; |
106 | si->util_free = (int)(free_user_blocks(sbi) >> sbi->log_blocks_per_seg) | 108 | si->util_free = (int)(free_user_blocks(sbi) >> sbi->log_blocks_per_seg) |
@@ -355,6 +357,8 @@ static int stat_show(struct seq_file *s, void *v) | |||
355 | si->skipped_atomic_files[BG_GC] + | 357 | si->skipped_atomic_files[BG_GC] + |
356 | si->skipped_atomic_files[FG_GC], | 358 | si->skipped_atomic_files[FG_GC], |
357 | si->skipped_atomic_files[BG_GC]); | 359 | si->skipped_atomic_files[BG_GC]); |
360 | seq_printf(s, "BG skip : IO: %u, Other: %u\n", | ||
361 | si->io_skip_bggc, si->other_skip_bggc); | ||
358 | seq_puts(s, "\nExtent Cache:\n"); | 362 | seq_puts(s, "\nExtent Cache:\n"); |
359 | seq_printf(s, " - Hit Count: L1-1:%llu L1-2:%llu L2:%llu\n", | 363 | seq_printf(s, " - Hit Count: L1-1:%llu L1-2:%llu L2:%llu\n", |
360 | si->hit_largest, si->hit_cached, | 364 | si->hit_largest, si->hit_cached, |