mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] smpboot: reuse timer calibration
@ 2019-10-29 14:19 Paul Menzel
  2019-10-29 14:35 ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2019-10-29 14:19 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Arjan van de Ven
  Cc: x86, LKML

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] smpboot: reuse timer calibration
  2019-10-29 14:19 [PATCH] smpboot: reuse timer calibration Paul Menzel
@ 2019-10-29 14:35 ` Peter Zijlstra
  2019-11-05 10:05   ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2019-10-29 14:35 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Arjan van de Ven, x86, LKML

On Tue, Oct 29, 2019 at 03:19:57PM +0100, Paul Menzel wrote:
> 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 patch makes no sense what so ever given the current function, also
it hard codes 0 as being the BSP.

All of this for platforms (!constant_tsc) that barely exist anymore.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] smpboot: reuse timer calibration
  2019-10-29 14:35 ` Peter Zijlstra
@ 2019-11-05 10:05   ` Thomas Gleixner
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2019-11-05 10:05 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Paul Menzel, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Arjan van de Ven, x86, LKML

On Tue, 29 Oct 2019, Peter Zijlstra wrote:
> On Tue, Oct 29, 2019 at 03:19:57PM +0100, Paul Menzel wrote:
> > 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 patch makes no sense what so ever given the current function, also
> it hard codes 0 as being the BSP.
> 
> All of this for platforms (!constant_tsc) that barely exist anymore.

And it's only an issue on multi-socket systems with !constant_tsc, which
are even more rare.

Thanks,

	tglx


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-05 10:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 14:19 [PATCH] smpboot: reuse timer calibration Paul Menzel
2019-10-29 14:35 ` Peter Zijlstra
2019-11-05 10:05   ` Thomas Gleixner

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®