Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline

From: Mike Galbraith
Date: Sat Feb 11 2017 - 03:01:15 EST


On Sat, 2017-02-11 at 08:15 +0100, luca abeni wrote:
> Hi Daniel,
>
> On Fri, 10 Feb 2017 20:48:11 +0100
> Daniel Bristot de Oliveira <bristot@xxxxxxxxxx> wrote:
>
> > During the activation, CBS checks if it can reuse the current
> > task's
> > runtime and period. If the deadline of the task is in the past, CBS
> > cannot use the runtime, and so it replenishes the task. This rule
> > works fine for implicit deadline tasks (deadline == period), and
> > the
> > CBS was designed for implicit deadline tasks. However, a task with
> > constrained deadline (deadine < period) might be awakened after the
> > deadline, but before the next period. In this case, replenishing
> > the
> > task would allow it to run for runtime / deadline. As in this case
> > deadline < period, CBS enables a task to run for more than the
> > runtime/period. In a very load system, this can cause the domino
> > effect, making other tasks to miss their deadlines.
>
> I think you are right: SCHED_DEADLINE implements the original CBS
> algorithm here, but uses relative deadlines different from periods in
> other places (while the original algorithm only considered relative
> deadlines equal to periods).
> An this mix is dangerous... I think your fix is correct, and cures a
> real problem.

Both of these should be tagged for stable as well, or?

-Mike