GC should run conservatively as possible to reduce latency spikes to the user.
Setting ioprio to idle class will allow the kernel to schedule GC thread's I/O to not affect any other processes' I/O requests. Signed-off-by: Park Ju Hyung <[email protected]> --- fs/f2fs/gc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index bfe6a8ccc3a0..54d2d74e9afe 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -143,6 +143,8 @@ int start_gc_thread(struct f2fs_sb_info *sbi) kfree(gc_th); sbi->gc_thread = NULL; } + set_task_ioprio(sbi->gc_thread->f2fs_gc_task, + IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0)); out: return err; } -- 2.14.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
