From 786545ff97f6349eb27e83a6ecfcf1646cd11b6f Mon Sep 17 00:00:00 2001 From: John Galt Date: Wed, 15 Feb 2023 10:44:37 -0500 Subject: [PATCH] erofs/zdata: modify set sched to use FIFO at high prio for lower latency Fixes: bdd668d3b54202 Signed-off-by: Ruchit --- fs/erofs/zdata.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 4414a6572d8e..47c8c3a8f5f5 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -10,6 +10,7 @@ #include #include +#include #include /* @@ -147,15 +148,15 @@ static void erofs_destroy_percpu_workers(void) static struct kthread_worker *erofs_init_percpu_worker(int cpu) { + static const struct sched_param sched_zero_prio; struct kthread_worker *worker = kthread_create_worker_on_cpu(cpu, 0, "erofs_worker/%u", cpu); if (IS_ERR(worker)) return worker; if (IS_ENABLED(CONFIG_EROFS_FS_PCPU_KTHREAD_HIPRI)) - sched_set_fifo_low(worker->task); - else - sched_set_normal(worker->task, 0); + sched_setscheduler_nocheck(worker->task, SCHED_FIFO, &sched_zero_prio); + //sched_set_fifo_low(worker->task); return worker; }