All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Waiman Long <longman@redhat.com>,
	Srinivas Eeda <srinivas.eeda@oracle.com>,
	x86@kernel.org
Subject: Re: [PATCH 2/2] Revert "x86/hpet: Reduce HPET counter read contention"
Date: Fri, 15 Mar 2019 10:25:29 +0100	[thread overview]
Message-ID: <20190315092529.GU5996@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1552552932-21821-2-git-send-email-zhenzhong.duan@oracle.com>

On Thu, Mar 14, 2019 at 04:42:12PM +0800, Zhenzhong Duan wrote:
> This reverts commit f99fd22e4d4bc84880a8a3117311bbf0e3a6a9dc.
> 
> It's unnecessory after commit "acpi_pm: Fix bootup softlockup due to PMTMR
> counter read contention", the simple HPET access code could be restored.
> 
> On a general system with good TSC, TSC is the final default clocksource.
> So the potential performce loss is only at bootup stage before TSC
> replacing HPET, we didn't observe obvious delay of bootup.

The timeline here is:

 - Len took out SKX from native_calibrate_tsc
   b51120309348 ("x86/tsc: Fix erroneous TSC rate on Skylake Xeon")

   This causes the TSC to run through the calibration code, which
   completes _after_ SMP bringup.

 - This then caused HPET to be used during SMP bringup, which resulted
   in Waiman doing the patch you now propose removing.

   Because large (multi-socket) SKX machines would barely boot.

   f99fd22e4d4b ("x86/hpet: Reduce HPET counter read contention")

 - Now, I figured that was all crazy to begin with, and introduced
   clocksource_tsc_early, such that we can run at the guestimate TSC
   frequency until we've completed calibration and then swap to the real
   TSC clocksource.

   aa83c45762a2 ("x86/tsc: Introduce early tsc clocksource")
   (and assorted fixes)

This means that we now only use HPET for a very short time in early
boot, _IFF_ TSC is stable.

Now, given the amount of wreckage we still see with TSC, I'm very
reluctant to revert this patch. Because the moment TSC goes out the
window, we're back on HPET, and this patch does make a huge difference.

Yes, its sad, gross and nasty... but the same is true for TSC still being
a trainwreck.

So NAK.

  reply	other threads:[~2019-03-15  9:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14  8:42 [PATCH 1/2] acpi_pm: Fix bootup softlockup due to PMTMR counter read contention Zhenzhong Duan
2019-03-14  8:42 ` [PATCH 2/2] Revert "x86/hpet: Reduce HPET counter read contention" Zhenzhong Duan
2019-03-15  9:25   ` Peter Zijlstra [this message]
2019-03-15  9:29     ` Peter Zijlstra
2019-03-15 14:17     ` Waiman Long
2019-03-18  8:44       ` Zhenzhong Duan
2019-03-18 15:35         ` Waiman Long
2019-03-20 10:24           ` 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=20190315092529.GU5996@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=srinivas.eeda@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=zhenzhong.duan@oracle.com \
    /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.