If the TSC has already been determined to be unstable, then checking TSC ADJUST values is a waste of time and generates unnecessary error messages (840 for a 16 socket Skylake 28/2 core/ht system). Signed-off-by: Mike Travis Reviewed-by: Dimitri Sivanich Reviewed-by: Russ Anderson --- arch/x86/kernel/tsc_sync.c | 7 +++++++ 1 file changed, 7 insertions(+) --- linux.orig/arch/x86/kernel/tsc_sync.c +++ linux/arch/x86/kernel/tsc_sync.c @@ -38,6 +38,10 @@ void tsc_verify_tsc_adjust(bool resume) if (!boot_cpu_has(X86_FEATURE_TSC_ADJUST)) return; + /* Skip unnecessary error messages if TSC already unstable */ + if (check_tsc_unstable()) + return; + /* Rate limit the MSR check */ if (!resume && time_before(jiffies, adj->nextcheck)) return; @@ -61,6 +65,9 @@ void tsc_verify_tsc_adjust(bool resume) static void tsc_sanitize_first_cpu(struct tsc_adjust *cur, s64 bootval, unsigned int cpu, bool bootcpu) { + /* Skip unnecessary error messages if TSC already unstable */ + if (check_tsc_unstable()) + return; /* * First online CPU in a package stores the boot value in the * adjustment value. This value might change later via the sync --