From: Peter Zijlstra Date: Tue, 21 Apr 2020 10:09:13 +0000 (+0200) Subject: sched,crypto: Convert to sched_set_fifo*() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=dbc6d0d5a5467adb6ea5fb25844e471c7bf8fabf;p=linux.git sched,crypto: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Use sched_set_fifo() to request SCHED_FIFO and delegate actual priority selection to userspace. Effectively no change in behaviour. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Acked-by: Herbert Xu --- diff --git a/crypto/crypto_engine.c b/crypto/crypto_engine.c index 3655d9d3f5dfb..198a8eb1cd560 100644 --- a/crypto/crypto_engine.c +++ b/crypto/crypto_engine.c @@ -482,7 +482,6 @@ struct crypto_engine *crypto_engine_alloc_init_and_set(struct device *dev, int (*cbk_do_batch)(struct crypto_engine *engine), bool rt, int qlen) { - struct sched_param param = { .sched_priority = MAX_RT_PRIO / 2 }; struct crypto_engine *engine; if (!dev) @@ -520,7 +519,7 @@ struct crypto_engine *crypto_engine_alloc_init_and_set(struct device *dev, if (engine->rt) { dev_info(dev, "will run requests pump with realtime priority\n"); - sched_setscheduler(engine->kworker->task, SCHED_FIFO, ¶m); + sched_set_fifo(engine->kworker->task); } return engine;