All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Feng Tang <feng.tang@intel.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Kai-Heng Feng <kai.heng.feng@canonical.com>,
	rui.zhang@intel.com, len.brown@intel.com
Subject: Re: [PATCH] x86/PCI: Convert force_disable_hpet() to standard quirk
Date: Mon, 30 Nov 2020 20:21:03 +0100	[thread overview]
Message-ID: <87eekairc0.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20201127061131.GB105524@shbuild999.sh.intel.com>

Feng,

On Fri, Nov 27 2020 at 14:11, Feng Tang wrote:
> On Fri, Nov 27, 2020 at 12:27:34AM +0100, Thomas Gleixner wrote:
>> On Thu, Nov 26 2020 at 09:24, Feng Tang wrote:
>> Yes, that can happen. But OTOH, we should start to think about the
>> requirements for using the TSC watchdog.
>> 
>> I'm inclined to lift that requirement when the CPU has:
>> 
>>     1) X86_FEATURE_CONSTANT_TSC
>>     2) X86_FEATURE_NONSTOP_TSC
>
>>     3) X86_FEATURE_NONSTOP_TSC_S3
> IIUC, this feature exists for several generations of Atom platforms,
> and it is always coupled with 1) and 2), so it could be skipped for
> the checking.

Yes, we can ignore that bit as it's not widely available and not
required to solve the problem.

>>     4) X86_FEATURE_TSC_ADJUST
>>     
>>     5) At max. 4 sockets
>> 
>> The only reason I hate to disable HPET upfront at least during boot is
>> that HPET is the best mechanism for the refined TSC calibration. PMTIMER
>> sucks because it's slow and wraps around pretty quick.
>> 
>> So we could do the following even on platforms where HPET stops in some
>> magic PC? state:
>> 
>>   - Register it during early boot as clocksource
>> 
>>   - Prevent the enablement as clockevent and the chardev hpet timer muck
>> 
>>   - Prevent the magic PC? state up to the point where the refined
>>     TSC calibration is finished.
>> 
>>   - Unregister it once the TSC has taken over as system clocksource and
>>     enable the magic PC? state in which HPET gets disfunctional.
>
> This looks reasonable to me. 
>
> I have thought about lowering the hpet rating to lower than PMTIMER, so it
> still contributes in early boot phase, and fades out after PMTIMER is
> initialised.

Not a good idea. pm_timer is initialized before the refined calibration
finishes.

Thanks,

        tglx

  reply	other threads:[~2020-11-30 19:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 18:19 [PATCH] x86/PCI: Convert force_disable_hpet() to standard quirk Bjorn Helgaas
2020-11-24 23:27 ` Bjorn Helgaas
2020-11-25 12:46 ` Thomas Gleixner
2020-11-25 19:13   ` Bjorn Helgaas
2020-11-26  0:50     ` Thomas Gleixner
2020-11-26  1:24   ` Feng Tang
2020-11-26 23:27     ` Thomas Gleixner
2020-11-27  6:11       ` Feng Tang
2020-11-30 19:21         ` Thomas Gleixner [this message]
2020-12-01  8:34           ` Feng Tang
2020-12-02  7:28           ` Zhang Rui
2022-09-29 15:52             ` Yu Liao
2022-09-30  0:38               ` Feng Tang
2022-09-30  1:05                 ` Xiongfeng Wang
2022-09-30  1:15                   ` Feng Tang
2022-09-30  9:45                     ` Yu Liao
2022-09-30 10:13                       ` Feng Tang
2022-10-01  5:18                         ` Zhang Rui
2022-10-01 12:00                           ` Feng Tang

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=87eekairc0.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=feng.tang@intel.com \
    --cc=helgaas@kernel.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rui.zhang@intel.com \
    --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.