[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1105260021570.3078@ionos>
Date: Thu, 26 May 2011 00:23:38 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Kasper Pedersen <kkp2010@...perkp.dk>
cc: linux-kernel@...r.kernel.org,
Suresh Siddha <suresh.b.siddha@...el.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
John Stultz <johnstul@...ibm.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Josh Triplett <josh@...htriplett.org>
Subject: Re: [PATCH v3] x86: tsc: make TSC calibration immune to interrupts
On Thu, 26 May 2011, Kasper Pedersen wrote:
> 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.
Yes, not worth the extra conditional.
> >> +
> >> + *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.
Fair enough. So a comment might be in order :) That code is fricking
complex just to figure out on which frequency that damn thing runs :(
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists