Commit dbc6d0d5 authored by Peter Zijlstra's avatar Peter Zijlstra

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: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarIngo Molnar <mingo@kernel.org>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0030c1d4
...@@ -482,7 +482,6 @@ struct crypto_engine *crypto_engine_alloc_init_and_set(struct device *dev, ...@@ -482,7 +482,6 @@ struct crypto_engine *crypto_engine_alloc_init_and_set(struct device *dev,
int (*cbk_do_batch)(struct crypto_engine *engine), int (*cbk_do_batch)(struct crypto_engine *engine),
bool rt, int qlen) bool rt, int qlen)
{ {
struct sched_param param = { .sched_priority = MAX_RT_PRIO / 2 };
struct crypto_engine *engine; struct crypto_engine *engine;
if (!dev) if (!dev)
...@@ -520,7 +519,7 @@ struct crypto_engine *crypto_engine_alloc_init_and_set(struct device *dev, ...@@ -520,7 +519,7 @@ struct crypto_engine *crypto_engine_alloc_init_and_set(struct device *dev,
if (engine->rt) { if (engine->rt) {
dev_info(dev, "will run requests pump with realtime priority\n"); 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; return engine;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment