summaryrefslogtreecommitdiff
path: root/crypto/crypto_engine.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-04-21 12:09:13 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-06-15 14:10:20 +0200
commit4ef1c41161851f7af2d938e4f351f6f2e65166c1 (patch)
treec5b239116b14f1019d6a88c4701f6f30b267cff6 /crypto/crypto_engine.c
parentd2868ae33ab257f2273d436b38cc390414a9384f (diff)
downloadlinux-crypto-4ef1c41161851f7af2d938e4f351f6f2e65166c1.tar.gz
linux-crypto-4ef1c41161851f7af2d938e4f351f6f2e65166c1.zip
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) <peterz@infradead.org> Reviewed-by: Ingo Molnar <mingo@kernel.org> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/crypto_engine.c')
-rw-r--r--crypto/crypto_engine.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/crypto_engine.c b/crypto/crypto_engine.c
index 3655d9d3..198a8eb1 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, &param);
+ sched_set_fifo(engine->kworker->task);
}
return engine;