Skip to content

Commit dbc6d0d

Browse files
author
Peter Zijlstra
committed
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) <[email protected]> Reviewed-by: Ingo Molnar <[email protected]> Acked-by: Herbert Xu <[email protected]>
1 parent 0030c1d commit dbc6d0d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crypto/crypto_engine.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ struct crypto_engine *crypto_engine_alloc_init_and_set(struct device *dev,
482482
int (*cbk_do_batch)(struct crypto_engine *engine),
483483
bool rt, int qlen)
484484
{
485-
struct sched_param param = { .sched_priority = MAX_RT_PRIO / 2 };
486485
struct crypto_engine *engine;
487486

488487
if (!dev)
@@ -520,7 +519,7 @@ struct crypto_engine *crypto_engine_alloc_init_and_set(struct device *dev,
520519

521520
if (engine->rt) {
522521
dev_info(dev, "will run requests pump with realtime priority\n");
523-
sched_setscheduler(engine->kworker->task, SCHED_FIFO, &param);
522+
sched_set_fifo(engine->kworker->task);
524523
}
525524

526525
return engine;

0 commit comments

Comments
 (0)