Re: [PATCH 16/23] sched,watchdog: Convert to sched_set_fifo()

From: Peter Zijlstra
Date: Wed Apr 22 2020 - 09:25:38 EST


On Wed, Apr 22, 2020 at 08:51:55AM -0400, Steven Rostedt wrote:
> On Wed, 22 Apr 2020 13:27:35 +0200
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> > 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.
> >
> > Effectively changes prio from 99 to 50.
>
> Hmm, this being a watchdog, and looking at commit 38a1222ae4f364d
> ("watchdog: core: make sure the watchdog worker always works")
>
> I wonder if we should add a sched_set_high(), or have some other kind of
> watchdog handler that is guaranteed to trigger.

It's FIFO, it'll never win from either a deadline or a stop-task. After
that it doesn't matter.

fifo_high() is most definitely a bad idea, because then we're back into
the whole 'fifo priority' has meaning -- it does not. At least, it
doesn't until you've got system design information.

Maybe we should rename fifo_low to get away from that. I just drew a
blank on a better name there.