lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Feb 2017 12:10:25 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     luca abeni <luca.abeni@...tannapisa.it>
Cc:     Daniel Bristot de Oliveira <bristot@...hat.com>,
        linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@....com>,
        Tommaso Cucinotta <tommaso.cucinotta@...up.it>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH 1/2] sched/deadline: Replenishment timer should fire in
 the next period

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@...hat.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@...tannapisa.it>

Holler if you disagree.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ