]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:39 +0000 (11:35 +0200)
commit296c7bcbef43bac1de1ccef8d1a3276f28ceaf22
tree7a16d9f59b237612dadba23d66e33d4a8d6c603c
parent6138a09dde3a7cf8b250df83ed515bf47f5b61bd
tick/sched: Reduce seqcount held scope in tick_do_update_jiffies64()

[ Upstream commit a8e09f156967a67b62b5efc53fadf841d5180be0 ]

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
Stable-dep-of: e9523a0d8189 ("tick/common: Align tick period with the HZ tick.")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/time/tick-sched.c