]> git.baikalelectronics.ru Git - kernel.git/commit
x86/tsc: Add a timer to make sure TSC_adjust is always checked
authorFeng Tang <feng.tang@intel.com>
Wed, 17 Nov 2021 02:37:50 +0000 (10:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:56 +0000 (09:04 +0100)
commit993ca29e44b617ca4fad9029fcebd877bff7df9a
tree5819120c095a2997d83ccb79cfb715f59eced7b6
parent4ff372391185c2fc2427919906b825ee3b6095e5
x86/tsc: Add a timer to make sure TSC_adjust is always checked

commit 5290b79b7b2e3c2539a1c42a1f73b5518ba9e2ef upstream.

The TSC_ADJUST register is checked every time a CPU enters idle state, but
Thomas Gleixner mentioned there is still a caveat that a system won't enter
idle [1], either because it's too busy or configured purposely to not enter
idle.

Setup a periodic timer (every 10 minutes) to make sure the check is
happening on a regular base.

[1] https://lore.kernel.org/lkml/875z286xtk.fsf@nanos.tec.linutronix.de/

Fixes: deae81ed03d8 ("x86/hpet: Use another crystalball to evaluate HPET usability")
Requested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20211117023751.24190-1-feng.tang@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/tsc_sync.c