Re: [PATCH] sched/deadline: Throttle a constrained task activated if overflow

From: Steven Rostedt
Date: Wed Apr 12 2017 - 08:36:15 EST


On Wed, 12 Apr 2017 20:30:04 +0800
Xunlei Pang <xpang@xxxxxxxxxx> wrote:

> Image this deadline task was preempted after running 0.1ms by another one with an
> earlier absolute deadline for 1.9ms, after scheduled back it will have the same status
> (1.9ms remaining runtime, 2ms remaining deadline) under the current implementation.
>
> I can hardly figure out the difference, why is wake-up(will check dl_entity_overflow())
> so special?

The difference between a wake-up and being preempted is that one is
voluntarily done by the application, the other is done by the
scheduler. The preemption done by the schedule must very well be in
line with the algorithms of the scheduler. But for cases where the task
voluntarily sleeps and then wakes up at some arbitrary time, the
scheduler has no idea what its intent was. Not to mention, it must
still guarantee the bandwidth for other tasks.

-- Steve