timers: Spare timer softirq until next expiry
authorFrederic Weisbecker <frederic@kernel.org>
Fri, 17 Jul 2020 14:05:49 +0000 (16:05 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 17 Jul 2020 19:55:24 +0000 (21:55 +0200)
commitd4f7dae87096dfe722bf32aa82076ece1063746c
tree86ec909b0294f69482200f4c691854005a180554
parent1f8a4212dc83f8353843fabf6465fd918372fbbf
timers: Spare timer softirq until next expiry

Now that the core timer infrastructure doesn't depend anymore on
periodic base->clk increments, even when the CPU is not in NO_HZ mode,
timer softirqs can be skipped until there are timers to expire.

Some spurious softirqs can still remain since base->next_expiry doesn't
keep track of canceled timers but this still reduces the number of softirqs
significantly: ~15 times less for HZ=1000 and ~5 times less for HZ=100.

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-11-frederic@kernel.org
kernel/time/timer.c