From 414da43f9f784af2cd245702f1298619d48a468d Mon Sep 17 00:00:00 2001 From: Park Ju Hyung Date: Tue, 26 Sep 2017 10:51:24 +0900 Subject: [PATCH] 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 Signed-off-by: Pranav Vashi --- fs/f2fs/gc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index c8ef3fb79..a0dff7202 100755 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -175,6 +175,8 @@ int f2fs_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; }