mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix TSC issues on (some) AMD Ryzen based systems
@ 2019-01-29 10:23 Jan H. Schönherr
  2019-01-29 10:23 ` [PATCH 1/2] x86/tsc: Allow quick PIT calibration despite interruptions Jan H. Schönherr
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jan H. Schönherr @ 2019-01-29 10:23 UTC (permalink / raw)
  To: Borislav Petkov, Ingo Molnar, Thomas Gleixner, x86
  Cc: Jan H. Schönherr, Paul Menzel, Thomas Lendacky,
	H. Peter Anvin, linux-kernel

My newly acquired AMD Ryzen Threadripper based system seems to have
some TSC quirks, which go away once the system is up.

Given the discussion in https://lkml.org/lkml/2019/1/28/1356 
I don't seem to be the only one, and it does not seem to be
Threadripper specific.

The first patch addresses presumably SMI interruptions, that occur
on my system at a 60 Hz frequency. They take too long, making the
existing code fail. The patch makes that code more resilient.
(These interruptions go away at some point during boot; also proven
by the fact, that I don't have any TSC issues, when kexecing into
a new kernel.)

The second patch prevents TSC going unstable when resuming from S3.
This may have a similar source, but is certainly more weird: the
TSC is observed to go backwards on CPU0 by about 200 to 500 cycles
compared to other CPUs every once in a while, as long as its sibling
(CPU16 in my case) hasn't been resumed yet. (I did some experiments
with CPU hotplug before and after suspend, but apart from reproducing
the issue and verifying the "fix", I got nowhere.)

The patches are against v4.20.

Jan H. Schönherr (2):
  x86/tsc: Allow quick PIT calibration despite interruptions
  cpu/hotplug: Unfreeze sibling CPU first on resume from S3

 arch/x86/kernel/tsc.c | 80 +++++++++++++++++++++++++------------------
 kernel/cpu.c          | 34 ++++++++++++------
 2 files changed, 70 insertions(+), 44 deletions(-)

-- 
2.19.2


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

end of thread, other threads:[~2019-02-14 21:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-29 10:23 [PATCH 0/2] Fix TSC issues on (some) AMD Ryzen based systems Jan H. Schönherr
2019-01-29 10:23 ` [PATCH 1/2] x86/tsc: Allow quick PIT calibration despite interruptions Jan H. Schönherr
     [not found]   ` <5C50558B.8060405@schnhrr.de>
2019-01-29 22:28     ` Thomas Gleixner
2019-02-12 11:57       ` Thomas Gleixner
2019-02-14 21:48         ` Jan H. Schönherr
2019-01-29 10:23 ` [PATCH 2/2] cpu/hotplug: Unfreeze sibling CPU first on resume from S3 Jan H. Schönherr
2019-01-29 23:02   ` Thomas Gleixner
2019-01-29 19:33 ` [PATCH 0/2] Fix TSC issues on (some) AMD Ryzen based systems Paul Menzel
2019-01-29 19:37   ` Paul Menzel
2019-01-29 22:31     ` 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®