From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Arjan van de Ven <arjan@linux.intel.com>
Cc: x86@kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] smpboot: reuse timer calibration
Date: Tue, 29 Oct 2019 15:19:57 +0100 [thread overview]
Message-ID: <ebb16cf3-128d-2515-a98a-a58db0c1f963@molgen.mpg.de> (raw)
From: Arjan van de Ven <arjan@linux.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@molgen.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
next reply other threads:[~2019-10-29 14:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 14:19 Paul Menzel [this message]
2019-10-29 14:35 ` Peter Zijlstra
2019-11-05 10:05 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ebb16cf3-128d-2515-a98a-a58db0c1f963@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=arjan@linux.intel.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®