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:   Thu, 2 Jul 2020 15:32:20 +0200
From:   Frederic Weisbecker <frederic@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Anna-Maria Gleixner <anna-maria@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>
Subject: Re: [RFC PATCH 10/10] timer: Lower base clock forwarding threshold

On Thu, Jul 02, 2020 at 03:21:35PM +0200, Thomas Gleixner wrote:
> Frederic Weisbecker <frederic@...nel.org> writes:
> > There is no apparent reason for not forwarding base->clk when it's 2
> > jiffies late, except perhaps for past optimizations. But since forwarding
> > has to be done at some point now anyway, this doesn't stand anymore.
> >
> > Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Anna-Maria Gleixner <anna-maria@...utronix.de>
> > Cc: Juri Lelli <juri.lelli@...hat.com>
> > ---
> >  kernel/time/timer.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/kernel/time/timer.c b/kernel/time/timer.c
> > index 439fee098e76..25a55c043297 100644
> > --- a/kernel/time/timer.c
> > +++ b/kernel/time/timer.c
> > @@ -883,7 +883,7 @@ static inline void forward_timer_base(struct timer_base *base)
> >  	 * Also while executing timers, base->clk is 1 offset ahead
> >  	 * of jiffies to avoid endless requeuing to current jffies.
> >  	 */
> > -	if ((long)(jnow - base->clk) < 2)
> > +	if ((long)(jnow - base->clk) < 1)
> >  		return;
> 
> The apparent reason is in the comment right above the condition ...

Hmm, that's a comment I added myself in the patch before.

The following part:

> >      * Also while executing timers, base->clk is 1 offset ahead
> >      * of jiffies to avoid endless requeuing to current jffies.
> >      */

relates to situation when (long)(jnow - base->clk) < 0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ