On 2025-09-08 08:36:32 [+0200], Lukas Wunner wrote: > --- a/kernel/sched/syscalls.c > +++ b/kernel/sched/syscalls.c > @@ -847,6 +847,15 @@ void sched_set_fifo(struct task_struct *p) > EXPORT_SYMBOL_GPL(sched_set_fifo); > > /* > + * Secondary IRQ handler has slightly lower priority than primary IRQ handler. For tasks that should be sched_set_fifo() but require not to preempt another sched_set_fifo() task. > + */ > +void sched_set_fifo_minus_one(struct task_struct *p) > +{ > + struct sched_param sp = { .sched_priority = MAX_RT_PRIO / 2 - 1 }; > + WARN_ON_ONCE(sched_setscheduler_nocheck(p, SCHED_FIFO, &sp) != 0); > +} > + > +/* > * For when you don't much care about FIFO, but want to be above SCHED_NORMAL. > */ > void sched_set_fifo_low(struct task_struct *p)