linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/2] sched/deadline: Fixes for constrained deadline tasks
@ 2017-02-13 19:05 Daniel Bristot de Oliveira
  2017-02-13 19:05 ` [PATCH V2 1/2] sched/deadline: Replenishment timer should fire in the next period Daniel Bristot de Oliveira
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Daniel Bristot de Oliveira @ 2017-02-13 19:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: bristot, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Tommaso Cucinotta, Luca Abeni, Steven Rostedt, Mike Galbraith,
	Romulo Silva de Oliveira

While reading sched deadline code, I find out that a constrained
deadline task could be replenished before the next period if
activated after the deadline, opening the window to run for more
than Q/P. The patch [2] explains and fixes this problem.

Furthermore, while fixing this issue, I found that the replenishment
timer was being fired at the deadline of the task. This works fine
for implicit deadline tasks (deadline == period) because the deadline
is at the same point in time of the next period. But that is not true
for constrained deadline tasks (deadline < period). This problem is
not as visible as the first because the runtime leakage takes
place only in the second activation. Next activations receive the
correct bandwidth. However, after the 2nd activation, tasks are
activated in the (period - dl_deadline) instant, which is before
the expected activation. This problem is explained in the fix
description as well.

Changes from V1:
 - Fix a broken comment style.
 - Fixes dl_is_constrained():
    A constrained deadline task has dl_deadline < dl_period; so
	"dl_runtime < dl_period"; s/runtime/deadline/

Daniel Bristot de Oliveira (2):
  sched/deadline: Replenishment timer should fire in the next period
  sched/deadline: Throttle a constrained deadline task activated after
    the deadline

 kernel/sched/deadline.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 52 insertions(+), 2 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2017-02-16 16:48 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-13 19:05 [PATCH V2 0/2] sched/deadline: Fixes for constrained deadline tasks Daniel Bristot de Oliveira
2017-02-13 19:05 ` [PATCH V2 1/2] sched/deadline: Replenishment timer should fire in the next period Daniel Bristot de Oliveira
2017-02-13 19:05 ` [PATCH V2 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Daniel Bristot de Oliveira
2017-02-14 15:54   ` Tommaso Cucinotta
2017-02-14 17:31     ` Daniel Bristot de Oliveira
2017-02-14 19:33   ` Steven Rostedt
2017-02-14 19:28 ` [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Steven Rostedt (VMware)
2017-02-14 22:49   ` luca abeni
2017-02-15  0:14     ` Steven Rostedt
2017-02-15  7:40       ` Luca Abeni
2017-02-15 10:29         ` Juri Lelli
2017-02-15 11:32           ` Peter Zijlstra
2017-02-15 12:31           ` Luca Abeni
2017-02-15 12:59             ` Juri Lelli
2017-02-15 13:13               ` Luca Abeni
2017-02-15 14:15                 ` Juri Lelli
2017-02-15 13:33               ` Daniel Bristot de Oliveira
2017-02-15 13:42                 ` Daniel Bristot de Oliveira
2017-02-15 14:09                   ` Steven Rostedt
2017-02-15 14:16                 ` Juri Lelli
2017-02-16 16:36                 ` Tommaso Cucinotta
2017-02-16 16:47                   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).