From: Kasper Pedersen <kkp2010@kasperkp.dk>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
Suresh Siddha <suresh.b.siddha@intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
John Stultz <johnstul@us.ibm.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Ingo Molnar <mingo@redhat.com>,
Josh Triplett <josh@joshtriplett.org>
Subject: Re: [PATCH v3] x86: tsc: make TSC calibration immune to interrupts
Date: Thu, 26 May 2011 00:07:26 +0200 [thread overview]
Message-ID: <4DDD7D9E.60100@kasperkp.dk> (raw)
In-Reply-To: <alpine.LFD.2.02.1105251243330.3078@ionos>
On 05/25/2011 12:51 PM, Thomas Gleixner wrote:
>> The 8 additional samples costs us 28 microseconds in startup
>> time.
>
> That's a good reason to avoid the whole conditional thing and just do
> the best of 5 always.
I do not mind removing it again.
The additional 170us only happen when quick_pit_calibrate fails,
and then native_calibrate_tsc burns 30ms extra anyway.
>> +
>> + *p = tp;
>
> The value is completely uninteresting when we return ULLONG_MAX.
>
native_calibrate_tsc() depends on *p being written regardless of
whether we can get a SMI-free reading:
/* We don't have an alternative source, disable TSC */
if (!hpet && !ref1 && !ref2) {
printk("TSC: No reference (HPET/PMTIMER) available\n");
return 0;
}
this works since acpi_pm_read_early() returns 0 when pmtmr_ioport
is 0, or CONFIG_X86_PM_TIMER is not set.
Without it we would report "calibration failed" rather than
"No reference" or "Using PIT" when there is neither pmtimer nor
hpet.
/Kasper Pedersen
next prev parent reply other threads:[~2011-05-25 22:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 19:47 [PATCH v3] x86: tsc: make TSC calibration immune to interrupts Kasper Pedersen
2011-05-25 10:51 ` Thomas Gleixner
2011-05-25 22:07 ` Kasper Pedersen [this message]
2011-05-25 22:23 ` 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=4DDD7D9E.60100@kasperkp.dk \
--to=kkp2010@kasperkp.dk \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=johnstul@us.ibm.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox