Commit 4b7f5cd8 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by sanglipeng
Browse files

tick: Get rid of tick_period

stable inclusion
from stable-v5.10.180
commit 107ea1f63b266afcf50b7a9496d04797d149c0cf
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8DDFN

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=107ea1f63b266afcf50b7a9496d04797d149c0cf



--------------------------------

[ Upstream commit b9965449 ]

The variable tick_period is initialized to NSEC_PER_TICK / HZ during boot
and never updated again.

If NSEC_PER_TICK is not an integer multiple of HZ this computation is less
accurate than TICK_NSEC which has proper rounding in place.

Aside of the inaccuracy there is no reason for having this variable at
all. It's just a pointless indirection and all usage sites can just use the
TICK_NSEC constant.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201117132006.766643526@linutronix.de


Stable-dep-of: e9523a0d ("tick/common: Align tick period with the HZ tick.")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 7e156fa7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment