All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Jan H. Schönherr" <jan@schnhrr.de>
Cc: Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, Paul Menzel <pmenzel@molgen.mpg.de>,
	Thomas Lendacky <Thomas.Lendacky@amd.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v2] x86/tsc: Allow quick PIT calibration despite interruptions
Date: Fri, 5 Apr 2019 00:06:16 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1904050005130.1802@nanos.tec.linutronix.de> (raw)
In-Reply-To: <alpine.DEB.2.21.1902142320300.1646@nanos.tec.linutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]

On Thu, 14 Feb 2019, Thomas Gleixner wrote:
> On Thu, 14 Feb 2019, Jan H. Schönherr wrote:
> 
> Cc+: Linus (he wrote the original implementation and might have opinions)
> 
> > Some systems experience regular interruptions (60 Hz SMI?), that prevent
> > the quick PIT calibration from succeeding: individual interruptions can be
> > so long, that the PIT MSB is observed to decrement by 2 or 3 instead of 1.
> > The existing code cannot recover from this.
> > 
> > The system in question is an AMD Ryzen Threadripper 2950X, microcode
> > 0x800820b, on an ASRock Fatal1ty X399 Professional Gaming, BIOS P3.30.
> > 
> > Change the code to handle (almost) arbitrary interruptions, as long
> > as they happen only once in a while and they do not take too long.
> > Specifically, also cover an interruption during the very first reads.
> > 
> > Signed-off-by: Jan H. Schönherr <jan@schnhrr.de>
> > ---
> > 
> > v2:
> > - Dropped the other hacky patch for the time being.
> > - Fixed the early exit check.
> > - Hopefully fixed all inaccurate math in v1.
> > - Extended comments.
> 
> That looks halfways sane, but I'm way too tired to wrap my head around
> it right now.

Went through it again and did not find any obvious issue. Nice work!

> Vs. comments: The big comment above pit_verify_msb() needs a big overhaul
> as well.

Would you please fix that up and repost?

Thanks,

	tglx

  reply	other threads:[~2019-04-04 22:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 21:46 [PATCH v2] x86/tsc: Allow quick PIT calibration despite interruptions Jan H. Schönherr
2019-02-14 22:23 ` Jan H. Schönherr
2019-02-14 22:24 ` Thomas Gleixner
2019-04-04 22:06   ` Thomas Gleixner [this message]
2019-02-15  9:36 ` Ingo Molnar
2019-02-15 10:36 ` Ingo Molnar
2020-05-28 14:20 Guilherme G. Piccoli

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=alpine.DEB.2.21.1904050005130.1802@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=Thomas.Lendacky@amd.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jan@schnhrr.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=torvalds@linux-foundation.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.