diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2020-07-23 17:16:41 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-07-24 12:49:40 +0200 |
commit | 31cd0e119d50cf27ebe214d1a8f7ca36692f13a5 (patch) | |
tree | 4e393a04f8ec71e0f417953cdcbecc859a3a0c83 /drivers/video | |
parent | 1b7efaa6154960396f414551841f1886d99b6872 (diff) | |
download | linux-31cd0e119d50cf27ebe214d1a8f7ca36692f13a5.tar.bz2 |
timers: Recalculate next timer interrupt only when necessary
The nohz tick code recalculates the timer wheel's next expiry on each idle
loop iteration.
On the other hand, the base next expiry is now always cached and updated
upon timer enqueue and execution. Only timer dequeue may leave
base->next_expiry out of date (but then its stale value won't ever go past
the actual next expiry to be recalculated).
Since recalculating the next_expiry isn't a free operation, especially when
the last wheel level is reached to find out that no timer has been enqueued
at all, reuse the next expiry cache when it is known to be reliable, which
it is most of the time.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200723151641.12236-1-frederic@kernel.org
Diffstat (limited to 'drivers/video')
0 files changed, 0 insertions, 0 deletions