]> git.baikalelectronics.ru Git - kernel.git/commit
tick/sched: Use tick_next_period for lockless quick check
authorThomas Gleixner <tglx@linutronix.de>
Tue, 17 Nov 2020 13:19:45 +0000 (14:19 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 19 Nov 2020 09:48:29 +0000 (10:48 +0100)
commita1a4600a6b03d12bb52001ce5b45aedc7ce19679
treeadb76ce0c98532922866523ded191a3a662195f8
parent4495410b32306729c517b3fa3fefc057ff3799b6
tick/sched: Use tick_next_period for lockless quick check

No point in doing calculations.

   tick_next_period = last_jiffies_update + tick_period

Just check whether now is before tick_next_period to figure out whether
jiffies need an update.

Add a comment why the intentional data race in the quick check is safe or
not so safe in a 32bit corner case and why we don't worry about it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201117132006.337366695@linutronix.de
kernel/time/tick-sched.c