lkml.org 
[lkml]   [2017]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@oracle.com>

Acked-by: Anna-Maria Gleixner <anna-maria@linutronix.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
>

\
 
 \ /
  Last update: 2017-10-17 17:34    [W:0.186 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site