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]
Message-ID: <alpine.DEB.2.20.1710171731320.19068@hypnos.tec.linutronix.de>
Date:   Tue, 17 Oct 2017 17:33:15 +0200 (CEST)
From:   Anna-Maria Gleixner <anna-maria@...utronix.de>
To:     Zhenzhong Duan <zhenzhong.duan@...cle.com>
cc:     sboyd@...eaurora.org, tglx@...utronix.de, john.stultz@...aro.org,
        Srinivas REDDY Eeda <srinivas.eeda@...cle.com>,
        Joe Jin <joe.jin@...cle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] timers: avoid an unnecessory iteration in
 __run_timers()

On Sun, 8 Oct 2017, Zhenzhong Duan wrote:

> When we know next expired timer is later than current jiffies, we don't need to
> call collect_expired_timers() again checking empty hlists.
> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@...cle.com>

Acked-by: Anna-Maria Gleixner <anna-maria@...utronix.de>

Thanks,

	Anna-Maria

> ---
>  kernel/time/timer.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/time/timer.c b/kernel/time/timer.c
> index f2674a0..02be824 100644
> --- a/kernel/time/timer.c
> +++ b/kernel/time/timer.c
> @@ -1560,8 +1560,7 @@ static int collect_expired_timers(struct timer_base *base,
>  		 * jiffies, otherwise forward to the next expiry time:
>  		 */
>  		if (time_after(next, jiffies)) {
> -			/* The call site will increment clock! */
> -			base->clk = jiffies - 1;
> +			base->clk = jiffies;
>  			return 0;
>  		}
>  		base->clk = next;
> -- 
> 1.7.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ