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

2017-02-16 Thread Steven Rostedt
On Thu, 16 Feb 2017 17:36:07 +0100 Tommaso Cucinotta wrote: > 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 wort

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 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-15 Thread Juri Lelli
On 15/02/17 14:33, Daniel Bristot de Oliveira wrote: > On 02/15/2017 01:59 PM, Juri Lelli wrote: > > Actually, another thing that we noticed, talking on IRC with Peter, is > > that we seem to be replenishing differently on different occasions: > > When a task is awakened (not by the replenishment

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

2017-02-15 Thread Juri Lelli
On 15/02/17 14:13, Luca Abeni wrote: > On Wed, 15 Feb 2017 12:59:25 + > Juri Lelli wrote: > > > On 15/02/17 13:31, Luca Abeni wrote: > > > Hi Juri, > > > > > > On Wed, 15 Feb 2017 10:29:19 + > > > Juri Lelli wrote: > > > [...] > > > > > Ok, thanks; I think I can now see why this can r

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

2017-02-15 Thread Steven Rostedt
On Wed, 15 Feb 2017 14:42:42 +0100 Daniel Bristot de Oliveira wrote: > On 02/15/2017 02:33 PM, Daniel Bristot de Oliveira wrote: > > dl_se->deadline = dl_se->deadline += pi_se->dl_period; > > ops, it should be: > > dl_se->deadline = dl_se->deadline + pi_se->dl_period; or dl_se->deadline +=

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

2017-02-15 Thread Daniel Bristot de Oliveira
On 02/15/2017 02:33 PM, Daniel Bristot de Oliveira wrote: > dl_se->deadline = dl_se->deadline += pi_se->dl_period; ops, it should be: dl_se->deadline = dl_se->deadline + pi_se->dl_period;

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

2017-02-15 Thread Daniel Bristot de Oliveira
On 02/15/2017 01:59 PM, Juri Lelli wrote: > Actually, another thing that we noticed, talking on IRC with Peter, is > that we seem to be replenishing differently on different occasions: When a task is awakened (not by the replenishment timer), it is not possible to know if the absolute deadline var

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

2017-02-15 Thread Luca Abeni
On Wed, 15 Feb 2017 12:59:25 + Juri Lelli wrote: > On 15/02/17 13:31, Luca Abeni wrote: > > Hi Juri, > > > > On Wed, 15 Feb 2017 10:29:19 + > > Juri Lelli wrote: > > [...] > > > > Ok, thanks; I think I can now see why this can result in a task > > > > consuming more than the reserved

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

2017-02-15 Thread Juri Lelli
On 15/02/17 13:31, Luca Abeni wrote: > Hi Juri, > > On Wed, 15 Feb 2017 10:29:19 + > Juri Lelli wrote: > [...] > > > Ok, thanks; I think I can now see why this can result in a task > > > consuming more than the reserved utilisation. I still need some > > > time to convince me that "runtime /

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

2017-02-15 Thread Luca Abeni
Hi Juri, On Wed, 15 Feb 2017 10:29:19 + Juri Lelli wrote: [...] > > Ok, thanks; I think I can now see why this can result in a task > > consuming more than the reserved utilisation. I still need some > > time to convince me that "runtime / (deadline - t) > dl_runtime / > > dl_deadline" is the

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

2017-02-15 Thread Peter Zijlstra
On Wed, Feb 15, 2017 at 10:29:19AM +, Juri Lelli wrote: > that we then dediced not to propose since (note that these are just my > memories of the dicussion, so everything it's up for further discussion, > also in light of the problem highlighted by Daniel) > > - SCHED_DEADLINE, as the docum

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

2017-02-15 Thread Juri Lelli
Hi, On 15/02/17 08:40, Luca Abeni wrote: > Hi Steven, > > On Tue, 14 Feb 2017 19:14:17 -0500 > Steven Rostedt wrote: > [...] > > > I am not sure about the correct fix (wouldn't > > > "runtime / (deadline - t) > dl_runtime / dl_deadline" allow the > > > task to use a fraction of CPU time equal to

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

2017-02-14 Thread Luca Abeni
Hi Steven, On Tue, 14 Feb 2017 19:14:17 -0500 Steven Rostedt wrote: [...] > > I am not sure about the correct fix (wouldn't > > "runtime / (deadline - t) > dl_runtime / dl_deadline" allow the > > task to use a fraction of CPU time equal to dl_runtime / > > dl_deadline?) > > > > The current code

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

2017-02-14 Thread Steven Rostedt
On Tue, 14 Feb 2017 23:49:26 +0100 luca abeni wrote: > Hi Steven, > > On Tue, 14 Feb 2017 14:28:48 -0500 > "Steven Rostedt (VMware)" wrote: > > > I was testing Daniel's changes with his test case, and tweaked it a > > little. Instead of having the runtime equal to the deadline, I > > increased

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

2017-02-14 Thread luca abeni
Hi Steven, On Tue, 14 Feb 2017 14:28:48 -0500 "Steven Rostedt (VMware)" wrote: > I was testing Daniel's changes with his test case, and tweaked it a > little. Instead of having the runtime equal to the deadline, I > increased the deadline ten fold. > > Daniel's test case had: > > attr.sc

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

2017-02-14 Thread Steven Rostedt (VMware)
I was testing Daniel's changes with his test case, and tweaked it a little. Instead of having the runtime equal to the deadline, I increased the deadline ten fold. Daniel's test case had: attr.sched_runtime = 2 * 1000 * 1000; /* 2 ms */ attr.sched_deadline = 2 * 1000 * 1