From 57a20b86b1279bbeb7ad5b19af18ac0fcd2f839c Mon Sep 17 00:00:00 2001 From: Park Ju Hyung Date: Tue, 26 Sep 2017 10:51:24 +0900 Subject: f2fs: set ioprio of GC kthread to idle 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 --- fs/f2fs/gc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/f2fs') diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index d8110db46..2ad858dd6 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; } -- cgit v1.2.3