[PATCH] sched/deadline: document behavior of sched_yield()

2016-09-08 Thread Tommaso Cucinotta
This is a documentation only patch, explaining the behavior of sched_yield() when a SCHED_DEADLINE task calls it (give up remaining runtime and suspend till next period). --- Documentation/scheduler/sched-deadline.txt | 13 + 1 file changed, 13 insertions(+) diff --git a/Documentation

[PATCH] sched/deadline: document behavior of sched_yield()

2016-09-09 Thread Tommaso Cucinotta
Added SoB, as per Juri's comment (thanks). This is a documentation only patch, explaining the behavior of sched_yield() when a SCHED_DEADLINE task calls it (give up remaining runtime and suspend till next period). T.

[PATCH] sched/deadline: document behavior of sched_yield()

2016-09-09 Thread Tommaso Cucinotta
This is a documentation only patch, explaining the behavior of sched_yield() when a SCHED_DEADLINE task calls it (give up remaining runtime and suspend till next period). Signed-off-by: Tommaso Cucinotta Reviewed-by: Juri Lelli --- Documentation/scheduler/sched-deadline.txt | 13

Re: [PATCH] sched/deadline: Add sched_dl documentation

2014-01-24 Thread Tommaso Cucinotta
On 22/01/14 13:51, Peter Zijlstra wrote: >>> Another possibly extension; one proposed by Ingo; is to demote tasks to >>> SCHED_OTHER once they exceed their budget instead of the full block they >>> get now -- we could possibly call this SCHED_FLAG_DL_CBS_SOFT or such. Soft reservations are also ve

Re: [PATCH] sched/deadline: Add sched_dl documentation

2014-01-28 Thread Tommaso Cucinotta
On 28/01/14 09:31, Peter Zijlstra wrote: >> Exactly. I can remember also a huge period might be harmful, because with it >> even a tiny utilization may lead to a big runtime that starves the whole non >> RT tasks for a significant time. > > Another way to solve that is with explicit slack time sc

Re: SCHED_DEADLINE cpudeadline.{h,c} fixup

2016-05-17 Thread Tommaso Cucinotta
o the heapify_up(), mirroring the heapify() that was already there (renamed heapify_down() for clarity). I'll rebase the speed-up patch on top of this, if it's a better approach. Anyone with further comments? Thanks again! T. -- Tommaso Cucinotta, Computer Engineering PhD Asso

[RFC PATCH 4/4] Split cpudl_set() into cpudl_set() and cpudl_clear(). These 2 exercise independent code paths and need different arguments.

2016-05-19 Thread Tommaso Cucinotta
--- kernel/sched/cpudeadline.c | 71 +- kernel/sched/cpudeadline.h | 3 +- kernel/sched/deadline.c| 10 +++ 3 files changed, 52 insertions(+), 32 deletions(-) diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c index 60f933a..0

[RFC PATCH 2/4] SCHED_DEADLINE cpu heap code clarification/refactory: - heapify_up factored out in new dedicated function (avoids repeatition of same code) - call to cpudl_change_key replaced with h

2016-05-19 Thread Tommaso Cucinotta
--- kernel/sched/cpudeadline.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c index d418449..3c42702 100644 --- a/kernel/sched/cpudeadline.c +++ b/kernel/sched/cpudeadline.c @@ -41

[RFC PATCH 3/4] Make deadline max-heap faster avoiding real swaps on heapify ops.

2016-05-19 Thread Tommaso Cucinotta
--- kernel/sched/cpudeadline.c | 114 +++-- 1 file changed, 69 insertions(+), 45 deletions(-) diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c index 3c42702..60f933a 100644 --- a/kernel/sched/cpudeadline.c +++ b/kernel/sched/cpudeadline.

[RFC PATCH 1/4] Minimally invasive deadline wrap-around bugfix for the SCHED_DEADLINE cpu heap.

2016-05-19 Thread Tommaso Cucinotta
--- kernel/sched/cpudeadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c index 5be5882..d418449 100644 --- a/kernel/sched/cpudeadline.c +++ b/kernel/sched/cpudeadline.c @@ -168,7 +168,7 @@ void cpudl_set(struct cpudl

SCHED_DEADLINE cpudeadline.{h,c} fixup

2016-05-19 Thread Tommaso Cucinotta
Hi all, I took Luca's advice to isolate the deadline wrap-around bugfix with a first minimally invasive patch (1-line). This leaves some weirdness in how cpudl_change_key() is called. Therefore, the second patch does a minimum of refactory to make things more explicit and clear. The 3rd patch cont

SCHED_DEADLINE cpudeadline.{h,c} fixup

2016-05-16 Thread Tommaso Cucinotta
Please, reply-all to this e-mail, I'm not subscribed to linux-kernel@. Thanks, Tommaso -- Tommaso Cucinotta, Computer Engineering PhD Associate Professor at the Real-Time Systems Laboratory (ReTiS) Scuola Superiore Sant'Anna, Pisa, Italy http://retis.sssup.it/people/tommaso >From ee5

[RFC PATCH 4/4] Split cpudl_set() into cpudl_set() and cpudl_clear().

2016-07-19 Thread Tommaso Cucinotta
-by: Luca Abeni Signed-off-by: Tommaso Cucinotta --- kernel/sched/cpudeadline.c | 71 +- kernel/sched/cpudeadline.h | 3 +- kernel/sched/deadline.c| 10 +++ 3 files changed, 52 insertions(+), 32 deletions(-) diff --git a/kernel/sched

SCHED_DEADLINE cpudeadline.{h,c} fixup

2016-07-19 Thread Tommaso Cucinotta
Hi, this is a rework of the cpudeadline bugfix and speed-up patch-set, that integrates all comments received so far from Luca and Juri. The first patch is a minimally invasive (1-line) fix for the deadline wrap-around bug. This leaves some weirdness in how cpudl_change_key() is called. Therefore,

[RFC PATCH 1/4] Minimally invasive deadline wrap-around bugfix for SCHED_DEADLINE cpu heap

2016-07-19 Thread Tommaso Cucinotta
patch fixes the problem with a minimally invasive change that forces cpudl_change_key() to heapify up in this case. Cc: Peter Zijlstra Cc: Juri Lelli Cc: Luca Abeni Reviewed-by: Luca Abeni Signed-off-by: Tommaso Cucinotta --- kernel/sched/cpudeadline.c | 2 +- 1 file changed, 1 insertion

[RFC PATCH 2/4] SCHED_DEADLINE cpu heap code clarification/refactory.

2016-07-19 Thread Tommaso Cucinotta
Signed-off-by: Tommaso Cucinotta --- kernel/sched/cpudeadline.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c index d418449..3c42702 100644 --- a/kernel/sched/cpudeadline.c +++ b

[RFC PATCH 3/4] Make deadline max-heap faster avoiding real swaps on heapify ops.

2016-07-19 Thread Tommaso Cucinotta
an Intel Core2 Duo. Cc: Peter Zijlstra Cc: Juri Lelli Cc: Luca Abeni Reviewed-by: Luca Abeni Signed-off-by: Tommaso Cucinotta --- kernel/sched/cpudeadline.c | 114 +++-- 1 file changed, 69 insertions(+), 45 deletions(-) diff --git a/kernel/sched

Re: [PATCH] sched/rt: RT_RUNTIME_GREED sched feature

2016-11-07 Thread Tommaso Cucinotta
On 07/11/2016 14:51, Daniel Bristot de Oliveira wrote: Hi Tommaso, Hi, I'm cc-ing Luca for GRUB et al., pls find a few further notes below... On 11/07/2016 11:31 AM, Tommaso Cucinotta wrote: as anticipated live to Daniel: -) +1 for the general concept, we'd need something simila

Re: [RFD] sched/deadline: Support single CPU affinity

2016-11-10 Thread Tommaso Cucinotta
above test like this: for_each_processor(cpu) \sum U[t]/A[t] \leq 1 (or U_max), for each task t on cpu, with utilization U[t] and A[t] tasks overall in its affinity mask (I'm not claiming we need scenarios with overlapping cpusets and G-EDF tasks, it's just in case it simplifies code)

Re: [RFD] sched/deadline: Support single CPU affinity

2016-11-10 Thread Tommaso Cucinotta
16b.pdf ? ... we're working at RETIS on simpler ways to make the AC for these split tasks cases (cc-ing Alessandro) that doesn't need demand-bound complex analysis... My2c, T. -- Tommaso Cucinotta, Computer Engineering PhD Associate Professor at the Real-Time Systems Labor

Re: [PATCH 2/3] cpufreq: schedutil: move slow path from workqueue to SCHED_FIFO task

2016-11-11 Thread Tommaso Cucinotta
truct sched_param param = { .sched_priority = 50 }; won't you have a tunable here? (sysctl?) Thanks, T. -- Tommaso Cucinotta, Computer Engineering PhD Associate Professor at the Real-Time Systems Laboratory (ReTiS) Scuola Superiore Sant'Anna, Pisa, Italy http://retis.sssup.it/people/tommaso

[RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched

2016-10-24 Thread Tommaso Cucinotta
Hi all, this is a tiny patch providing readings of the current (leftover) runtime and absolute deadline in /proc/*/sched. Mostly useful for debugging, I heard others playing with SCHED_DEADLINE had some need for similar patches as well. In addition to debugging, reading the leftover runtime is ge

[RFC PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/*/sched

2016-10-24 Thread Tommaso Cucinotta
From: Tommaso Cucinotta --- kernel/sched/debug.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index fa178b6..109adc0 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -953,6 +953,10 @@ void proc_sched_show_task(struct

[PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/-/sched

2016-10-26 Thread Tommaso Cucinotta
This patch allows for reading the current (leftover) runtime and absolute deadline in /proc/*/sched, for debugging purposes. This revised patch: 1) has a fixed format, Signed-off-by, etc., as suggested by Juri 2) now includes related docs in Documentation/ 3) now I'm sending these e-mails with the

[PATCH] sched/deadline: show leftover runtime and abs deadline in /proc/*/sched

2016-10-26 Thread Tommaso Cucinotta
This patch allows for reading the current (leftover) runtime and absolute deadline of a SCHED_DEADLINE task through /proc/*/sched (entries dl.runtime and dl.deadline), while debugging/testing. Signed-off-by: Tommaso Cucinotta Reviewed-by: Juri Lelli Reviewed-by: Luca Abeni Acked-by: Daniel

Re: [RFD] sched/deadline: Support single CPU affinity

2016-12-15 Thread Tommaso Cucinotta
Hi Peter, On 13/12/2016 11:21, Peter Zijlstra wrote: On Thu, Nov 10, 2016 at 11:01:59AM +0100, Tommaso Cucinotta wrote: Just a note: if you want to recover arbitrary task affinities, you can re-cast your above test like this: for_each_processor(cpu) \sum U[t]/A[t] \leq 1 (or U_max), for

Re: [PATCH] sched/rt: RT_RUNTIME_GREED sched feature

2016-11-07 Thread Tommaso Cucinotta
as anticipated live to Daniel: -) +1 for the general concept, we'd need something similar also for SCHED_DEADLINE -) only issue might be that, if a non-RT task wakes up after the unthrottle, it will have to wait, but worst-case it will have a chance in the next throttling window -) an alternati

Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-16 Thread Tommaso Cucinotta
On 15/02/2017 14:33, Daniel Bristot de Oliveira wrote: [1] For the sake of completeness: - dl_se->deadline = Absolute deadline - dl_se->dl_deadline = Relative deadline Daniel's note [1] reminds me that, would it be worth a rename of these, for the sake of clarity, e.g.: -) abs_deadline vs rel_d

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

2017-02-14 Thread Tommaso Cucinotta
On 13/02/2017 20:05, Daniel Bristot de Oliveira wrote: To avoid this problem, in the activation of a constrained deadline task after the deadline but before the next period, throttle the task and set the replenishing timer to the begin of the next period, unless it is boosted. my only comment i

[PATCH] sched/deadline: document behavior of sched_yield()

2016-09-09 Thread Tommaso Cucinotta
Hi again, this is the reworked text following the comments by Luca, Juri and Daniel (thanks everybody), namely: -) "throttled" instead of "suspended" -) no more "reservation period" is mentioned -- just "period" Please, let me know if this sounds better now, thanks! T.

[PATCH] sched/deadline: document behavior of sched_yield()

2016-09-09 Thread Tommaso Cucinotta
This is a documentation only patch, explaining the behavior of sched_yield() when a SCHED_DEADLINE task calls it (give up remaining runtime and be throttled until next period begins). Signed-off-by: Tommaso Cucinotta Reviewed-by: Juri Lelli Reviewed-by: Luca Abeni Reviewed-by: Daniel Bristot

[RFC PATCH 1/3] sched/deadline: refactor cpu heap code

2016-08-14 Thread Tommaso Cucinotta
needed. Cc: Peter Zijlstra Cc: Juri Lelli Cc: Luca Abeni Reviewed-by: Luca Abeni Reviewed-by: Juri Lelli Signed-off-by: Tommaso Cucinotta --- kernel/sched/cpudeadline.c | 50 +- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/kernel

[RFC PATCH 2/3] sched/deadline: make cpu heap faster avoiding real swaps on heapify

2016-08-14 Thread Tommaso Cucinotta
an Intel Core2 Duo. Cc: Peter Zijlstra Cc: Juri Lelli Cc: Luca Abeni Reviewed-by: Luca Abeni Reviewed-by: Juri Lelli Signed-off-by: Tommaso Cucinotta --- kernel/sched/cpudeadline.c | 66 +++--- 1 file changed, 45 insertions(+), 21 deletions(-) diff

[RFC PATCH 3/3] sched/deadline: split cpudl_set() into cpudl_set() and cpudl_clear()

2016-08-14 Thread Tommaso Cucinotta
Abeni Reviewed-by: Luca Abeni Reviewed-by: Juri Lelli Signed-off-by: Tommaso Cucinotta --- kernel/sched/cpudeadline.c | 49 +++--- kernel/sched/cpudeadline.h | 3 ++- kernel/sched/deadline.c| 10 +- 3 files changed, 40 insertions(+), 22

SCHED_DEADLINE cpudeadline.{h,c} fixup

2016-08-14 Thread Tommaso Cucinotta
Hi, this is a rework of the cpudeadline bugfix and speed-up patch-set, that integrates all comments received so far from Luca, Juri and Peter. Compared with the previous post, here: -) I'm keeping out the minimally invasive bugfix, as it's already been merged in tip/sched/core -) I moved some

[tip:sched/core] sched/deadline: Show leftover runtime and abs deadline in /proc/*/sched

2017-01-14 Thread tip-bot for Tommaso Cucinotta
Commit-ID: 59f8c2989283bbd3df9fcfb22494d84f4852e536 Gitweb: http://git.kernel.org/tip/59f8c2989283bbd3df9fcfb22494d84f4852e536 Author: Tommaso Cucinotta AuthorDate: Wed, 26 Oct 2016 11:17:17 +0200 Committer: Ingo Molnar CommitDate: Sat, 14 Jan 2017 11:30:00 +0100 sched/deadline: Show

[tip:sched/core] sched/deadline: Fix wrap-around in DL heap

2016-08-10 Thread tip-bot for Tommaso Cucinotta
Commit-ID: a23eadfae2fd45536a355b785d5a1533e1955c22 Gitweb: http://git.kernel.org/tip/a23eadfae2fd45536a355b785d5a1533e1955c22 Author: Tommaso Cucinotta AuthorDate: Tue, 19 Jul 2016 11:44:50 +0200 Committer: Ingo Molnar CommitDate: Wed, 10 Aug 2016 13:32:55 +0200 sched/deadline: Fix

[tip:sched/core] sched/deadline: Document behavior of sched_yield()

2016-09-10 Thread tip-bot for Tommaso Cucinotta
Commit-ID: b95202a3b6bb8715a716dbdb15cdb82bf622260b Gitweb: http://git.kernel.org/tip/b95202a3b6bb8715a716dbdb15cdb82bf622260b Author: Tommaso Cucinotta AuthorDate: Fri, 9 Sep 2016 19:45:17 +0200 Committer: Ingo Molnar CommitDate: Sat, 10 Sep 2016 11:17:41 +0200 sched/deadline

[tip:sched/core] sched/deadline: Refactor CPU heap code

2016-09-05 Thread tip-bot for Tommaso Cucinotta
Commit-ID: 126b3b6842cc848fc9880e7816e0a8d743be51f1 Gitweb: http://git.kernel.org/tip/126b3b6842cc848fc9880e7816e0a8d743be51f1 Author: Tommaso Cucinotta AuthorDate: Sun, 14 Aug 2016 16:27:06 +0200 Committer: Ingo Molnar CommitDate: Mon, 5 Sep 2016 13:29:42 +0200 sched/deadline

[tip:sched/core] sched/deadline: Make CPU heap faster avoiding real swaps on heapify

2016-09-05 Thread tip-bot for Tommaso Cucinotta
Commit-ID: 8e1bc301aaf9f9a2d731bf8d50d549ac2dcfdab2 Gitweb: http://git.kernel.org/tip/8e1bc301aaf9f9a2d731bf8d50d549ac2dcfdab2 Author: Tommaso Cucinotta AuthorDate: Sun, 14 Aug 2016 16:27:07 +0200 Committer: Ingo Molnar CommitDate: Mon, 5 Sep 2016 13:29:43 +0200 sched/deadline: Make

[tip:sched/core] sched/deadline: Split cpudl_set() into cpudl_set() and cpudl_clear()

2016-09-05 Thread tip-bot for Tommaso Cucinotta
Commit-ID: d8206bb3ffe0eaee03abfad46fd44d8b17142e88 Gitweb: http://git.kernel.org/tip/d8206bb3ffe0eaee03abfad46fd44d8b17142e88 Author: Tommaso Cucinotta AuthorDate: Sun, 14 Aug 2016 16:27:08 +0200 Committer: Ingo Molnar CommitDate: Mon, 5 Sep 2016 13:29:43 +0200 sched/deadline: Split