Re: [RFC PATCH V3 6/6] sched/fair: Implement starvation monitor
From: Peter Zijlstra
Date: Fri Jun 16 2023 - 07:52:20 EST
On Thu, Jun 08, 2023 at 05:58:18PM +0200, Daniel Bristot de Oliveira wrote:
> From: Juri Lelli <juri.lelli@xxxxxxxxxx>
>
> Starting deadline server for lower priority classes right away when
> first task is enqueued might break guarantees, as tasks belonging to
> intermediate priority classes could be uselessly preempted. E.g., a well
> behaving (non hog) FIFO task can be preempted by NORMAL tasks even if
> there are still CPU cycles available for NORMAL tasks to run, as they'll
> be running inside the fair deadline server for some period of time.
>
> To prevent this issue, implement a starvation monitor mechanism that
Why should this be prevented? FIFO can be preempted by a higher
priority FIFO/RR, or in this case by DEADLINE, and always by stop_task.
Just accept this.
Anything that's build around FIFO-99 not getting preempted is just plain
broken. Don't try and pander to broken.