tick/sched: Reduce seqcount held scope in tick_do_update_jiffies64()
authorYunfeng Ye <yeyunfeng@huawei.com>
Tue, 17 Nov 2020 13:19:46 +0000 (14:19 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 19 Nov 2020 09:48:29 +0000 (10:48 +0100)
commit94ad2e3cedb82af034f6d97c58022f162b669f9b
treeaaa1c3966d314e14a15da94422c0ae1134026a2f
parent372acbbaa80940189593f9d69c7c069955f24f7a
tick/sched: Reduce seqcount held scope in tick_do_update_jiffies64()

If jiffies are up to date already (caller lost the race against another
CPU) there is no point to change the sequence count. Doing that just forces
other CPUs into the seqcount retry loop in tick_nohz_next_event() for
nothing.

Just bail out early.

[ tglx: Rewrote most of it ]

Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201117132006.462195901@linutronix.de
kernel/time/tick-sched.c