f2fs: add a tracepoint for background gc

This patch introduces a tracepoint to monitor background gc behaviors.

Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
This commit is contained in:
Jaegeuk Kim 2015-10-05 11:32:34 -07:00
commit 5c26743474
2 changed files with 31 additions and 0 deletions

View file

@ -77,6 +77,9 @@ static int gc_thread_func(void *data)
stat_inc_bggc_count(sbi);
trace_f2fs_background_gc(sbi->sb, wait_ms,
prefree_segments(sbi), free_segments(sbi));
/* if return value is not zero, no victim was selected */
if (f2fs_gc(sbi, test_opt(sbi, FORCE_FG_GC)))
wait_ms = gc_th->no_gc_sleep_time;