Re: [patch 1/7] timers: Sanitize catchup_timer_jiffies() usage

From: Viresh Kumar
Date: Wed May 27 2015 - 01:39:29 EST


On 26-05-15, 22:50, Thomas Gleixner wrote:
> 3) __run_timers()
>
> We only check on entry, which is silly, because base->timer_jiffies
> can be behind - especially on NOHZ kernels - and if there is a
> single deferrable timer somewhere between base->timer_jiffies and
> jiffies we expire it and then loop until base->timer_jiffies ==
> jiffies.

This may be incorrect. Once we expire that single deferrable timer, we
call detach_expired_timer(), which calls catchup_timer_jiffies() at
its end. And so the following loop should end right away, isn't it ?

while (time_after_eq(jiffies, base->timer_jiffies))

> +++ tip/kernel/time/timer.c
> -static bool catchup_timer_jiffies(struct tvec_base *base)
> +static inline bool catchup_timer_jiffies(struct tvec_base *base)

There is only one user left for this routine now, i.e. __run_timers().
Should we drop this routine ?

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/