timers: Lower base clock forwarding threshold
authorFrederic Weisbecker <frederic@kernel.org>
Fri, 17 Jul 2020 14:05:51 +0000 (16:05 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 17 Jul 2020 19:55:25 +0000 (21:55 +0200)
There is nothing that prevents from forwarding the base clock if it's one
jiffy off. The reason for this arbitrary limit of two jiffies is historical
and does not longer exist.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Juri Lelli <juri.lelli@redhat.com>
Link: https://lkml.kernel.org/r/20200717140551.29076-13-frederic@kernel.org
kernel/time/timer.c

index 8b3fb52..77e21e9 100644 (file)
@@ -894,7 +894,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;
 
        /*