[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ebb16cf3-128d-2515-a98a-a58db0c1f963@molgen.mpg.de>
Date: Tue, 29 Oct 2019 15:19:57 +0100
From: Paul Menzel <pmenzel@...gen.mpg.de>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Arjan van de Ven <arjan@...ux.intel.com>
Cc: x86@...nel.org, LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] smpboot: reuse timer calibration
From: Arjan van de Ven <arjan@...ux.intel.com>
Date: Wed, 11 Feb 2015 17:28:14 -0600
NO point recalibrating for known-constant tsc ...
saves 200ms+ of boot time.
Signed-off-by: Paul Menzel <pmenzel@...gen.mpg.de>
---
Arjan, can your Signed-off-by line be added? On what device, did you
test this?
This upstreams the patch from Clear Linux.
https://github.com/clearlinux-pkgs/linux/blob/master/0108-smpboot-reuse-timer-calibration.patch
arch/x86/kernel/tsc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index c59454c382fd..42b07ed467d2 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -1525,6 +1525,9 @@ unsigned long calibrate_delay_is_known(void)
if (!constant_tsc || !mask)
return 0;
+ if (cpu != 0)
+ return cpu_data(0).loops_per_jiffy;
+
sibling = cpumask_any_but(mask, cpu);
if (sibling < nr_cpu_ids)
return cpu_data(sibling).loops_per_jiffy;
--
2.24.0.rc1
Powered by blists - more mailing lists