Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1579630
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] sched/deadline: Replenishment timer should fire in the next period |
| Date | 2017-02-13 12:20 +0100 |
| Message-ID | <tamPM-2Yu-3@gated-at.bofh.it> (permalink) |
| References | <t9pmF-7LY-1@gated-at.bofh.it> <t9pmG-7LY-13@gated-at.bofh.it> <t9A8p-69n-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, Feb 11, 2017 at 08:12:37AM +0100, luca abeni wrote:
> Hi Daniel,
>
> On Fri, 10 Feb 2017 20:48:10 +0100
> Daniel Bristot de Oliveira <bristot@redhat.com> wrote:
>
> [...]
> > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> > index 70ef2b1..3c94d85 100644
> > --- a/kernel/sched/deadline.c
> > +++ b/kernel/sched/deadline.c
> > @@ -505,10 +505,15 @@ static void update_dl_entity(struct
> > sched_dl_entity *dl_se, }
> > }
> >
> > +static inline u64 dl_next_period(struct sched_dl_entity *dl_se)
> > +{
> > + return dl_se->deadline - dl_se->dl_deadline +
> > dl_se->dl_period; +}
> > +
> > /*
> > * If the entity depleted all its runtime, and if we want it to sleep
> > * while waiting for some new execution time to become available, we
> > - * set the bandwidth enforcement timer to the replenishment instant
> > + * set the bandwidth replenishment timer to the replenishment instant
> > * and try to activate it.
> > *
> > * Notice that it is important for the caller to know if the timer
> > @@ -530,7 +535,7 @@ static int start_dl_timer(struct task_struct *p)
> > * that it is actually coming from rq->clock and not from
> > * hrtimer's time base reading.
> > */
> > - act = ns_to_ktime(dl_se->deadline);
> > + act = ns_to_ktime(dl_next_period(dl_se));
>
> Looks like there is a real bug in the code, and your fix looks correct
> to me. I think it should be committed.
>
I've interpreted this as:
Reviewed-by: Luca Abeni <luca.abeni@santannapisa.it>
Holler if you disagree.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] sched/deadline: Fixes for constrained deadline tasks Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-10 20:50 +0100
[PATCH 1/2] sched/deadline: Replenishment timer should fire in the next period Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-10 20:50 +0100
Re: [PATCH 1/2] sched/deadline: Replenishment timer should fire in the next period Steven Rostedt <rostedt@goodmis.org> - 2017-02-10 22:50 +0100
Re: [PATCH 1/2] sched/deadline: Replenishment timer should fire in the next period luca abeni <luca.abeni@santannapisa.it> - 2017-02-11 08:20 +0100
Re: [PATCH 1/2] sched/deadline: Replenishment timer should fire in the next period Peter Zijlstra <peterz@infradead.org> - 2017-02-13 12:20 +0100
Re: [PATCH 1/2] sched/deadline: Replenishment timer should fire in the next period Steven Rostedt <rostedt@goodmis.org> - 2017-02-13 16:10 +0100
Re: [PATCH 1/2] sched/deadline: Replenishment timer should fire in the next period Juri Lelli <juri.lelli@arm.com> - 2017-02-13 16:40 +0100
[PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-10 20:50 +0100
Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline luca abeni <luca.abeni@santannapisa.it> - 2017-02-11 08:20 +0100
Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Mike Galbraith <efault@gmx.de> - 2017-02-11 09:10 +0100
Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Steven Rostedt <rostedt@goodmis.org> - 2017-02-11 15:40 +0100
Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Peter Zijlstra <peterz@infradead.org> - 2017-02-13 12:20 +0100
Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Peter Zijlstra <peterz@infradead.org> - 2017-02-13 12:20 +0100
Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-13 14:20 +0100
Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Steven Rostedt <rostedt@goodmis.org> - 2017-02-13 16:40 +0100
Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-13 17:00 +0100
Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Daniel Bristot de Oliveira <bristot@redhat.com> - 2017-02-13 17:30 +0100
csiph-web