erofs/zdata: modify set sched to use FIFO at high prio for lower latency

Fixes: bdd668d3b54202
Signed-off-by: Ruchit <ruchitmarathe@gmail.com>
fourteen
John Galt 2 years ago committed by Jenna
parent ae900d3dfa
commit 786545ff97
  1. 7
      fs/erofs/zdata.c

@ -10,6 +10,7 @@
#include <linux/slab.h>
#include <linux/cpuhotplug.h>
#include <uapi/linux/sched/types.h>
#include <trace/events/erofs.h>
/*
@ -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;
}

Loading…
Cancel
Save