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 <qkrwngud825@gmail.com>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
This commit is contained in:
Park Ju Hyung 2017-09-26 10:51:24 +09:00 committed by spakkkk
parent f64ba4724c
commit 78e3f5a4b3

View File

@ -195,7 +195,9 @@ int f2fs_start_gc_thread(struct f2fs_sb_info *sbi)
sbi->gc_thread = NULL;
return err;
}
set_task_ioprio(sbi->gc_thread->f2fs_gc_task,
IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0));
return 0;
}