|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|