Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1581318
| From | Daniel Bristot de Oliveira <bristot@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow |
| Date | 2017-02-15 14:40 +0100 |
| Message-ID | <tb7Yl-zU-7@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <taVu9-q8-1@gated-at.bofh.it> <tb2vD-5gZ-1@gated-at.bofh.it> <tb50u-78r-17@gated-at.bofh.it> <tb72h-8qp-9@gated-at.bofh.it> <tb7lE-5n-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 stores the absolute deadline of activation which took place in the instant (current time) - dl_period. Therefore, assuming the next deadline is one dl_deadline away from now is correct. IOW: that is a sporadic activation - the task is activated after at least minimum inter-arrival time between activation/replenishment: > - on wakeup (if overflowing) we do > > dl_se->deadline = rq_clock(rq) + pi_se->dl_deadline; > dl_se->runtime = pi_se->dl_runtime; In the replenishment timer, it is known that the absolute deadline instant of the previous activation is in the deadline var. So putting the absolute deadline one dl_period away is correct [1]. Another point is that this case avoids creating time drift due to latencies. For instance, in the case of a 1 ms delay of the timer (interrupts disabled?), the wakeup replenishment would push the absolute a relative deadline + 1 ms away from the previous deadline. IOW: the replenishment timer makes the periodic case - a fixed time offset from the previous activation/replenishment. > - when the replenishment timer fires (un-thottle and with runtime < 0) > > dl_se->deadline += pi_se->dl_period; > dl_se->runtime += pi_se->dl_runtime; So I think it is correct. Am I missing something? [1] For the sake of completeness: - dl_se->deadline = Absolute deadline - dl_se->dl_deadline = Relative deadline the next absolute deadline is at: dl_se->deadline = dl_next_period(dl_se) + dl_se->dl_deadline; as dl_next_period(dl_se) is: dl_se->deadline - dl_se->dl_deadline + dl_se->dl_period; the next deadline is at: dl_se->deadline = dl_se->deadline - dl_se->dl_deadline + dl_se->dl_period + dl_se->dl_deadline Which can be simplified to: dl_se->deadline = dl_se->deadline += pi_se->dl_period; because we have (- dl_se->dl_deadline) + dl_se->dl_deadline. -- Daniel
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 0/2] sched/deadline: Fixes for constrained deadline tasks Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-13 20:10 +0100
[PATCH V2 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-13 20:10 +0100
Re: [PATCH V2 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Tommaso Cucinotta <tommaso.cucinotta@santannapisa.it> - 2017-02-14 18:00 +0100
Re: [PATCH V2 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-14 18:40 +0100
Re: [PATCH V2 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Steven Rostedt <rostedt@goodmis.org> - 2017-02-14 20:40 +0100
[PATCH V2 1/2] sched/deadline: Replenishment timer should fire in the next period Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-13 20:10 +0100
[PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow "Steven Rostedt (VMware)" <rostedt@goodmis.org> - 2017-02-14 20:30 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow luca abeni <luca.abeni@santannapisa.it> - 2017-02-14 23:50 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Steven Rostedt <rostedt@goodmis.org> - 2017-02-15 01:20 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Luca Abeni <luca.abeni@santannapisa.it> - 2017-02-15 08:50 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Juri Lelli <juri.lelli@arm.com> - 2017-02-15 11:30 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Peter Zijlstra <peterz@infradead.org> - 2017-02-15 12:40 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Luca Abeni <luca.abeni@santannapisa.it> - 2017-02-15 13:40 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Juri Lelli <juri.lelli@arm.com> - 2017-02-15 14:00 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Luca Abeni <luca.abeni@santannapisa.it> - 2017-02-15 14:20 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Juri Lelli <juri.lelli@arm.com> - 2017-02-15 15:20 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-15 14:40 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-15 14:50 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Steven Rostedt <rostedt@goodmis.org> - 2017-02-15 15:10 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Juri Lelli <juri.lelli@arm.com> - 2017-02-15 15:20 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Tommaso Cucinotta <tommaso.cucinotta@santannapisa.it> - 2017-02-16 17:40 +0100
Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow Steven Rostedt <rostedt@goodmis.org> - 2017-02-16 17:50 +0100
csiph-web