From: Alok Kataria <akataria@vmware.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
Arjan van de Veen <arjan@infradead.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Daniel Hecht <dhecht@vmware.com>,
Garrett Smith <garrett@vmware.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [RFC patch 0/4] TSC calibration improvements
Date: Thu, 04 Sep 2008 11:31:43 -0700 [thread overview]
Message-ID: <1220553103.11753.39.camel@alok-dev1> (raw)
In-Reply-To: <alpine.LFD.1.10.0809041044160.3400@nehalem.linux-foundation.org>
On Thu, 2008-09-04 at 10:53 -0700, Linus Torvalds wrote:
>
> On Thu, 4 Sep 2008, Alok Kataria wrote:
> >
> > Looping for a smaller timeout is really going to strain things for
> > Virtualization.
>
> Can you check the patch I just sent out?
>
> It loops for a _very_ short timeout, but on the other hand it should also
> absolutely immediately notice that it's getting the wrong expected values
> under virtualization, and the fast case will then fail early.
Yep tried that, the fast calibration failed in 4-5 reboots that i did
until now. Will do some more runs just to be sure.
>
> It then falls back on the slow case, but I don't think you can avoid that
> under virtualization.
That's fine i think the slow calibration works well for us and we can
live with the added 200msec delay while booting.
I am assuming the patch you just sent was for 2.6.27.
And that we won't be changing the timeout's after this patch.
So, can we also apply the 2 patches that I sent yesterday on top of this
one ? the one that calibrated against pmtimer/hpet over the full loop
and the one that fixed the warning message. Both of these will affect
the slower case, which is now not the common case when running on native
hardware.
In the long run though, I think to get rid of all this complexity, we
can think of getting the frequency from the hypervisor. Lets see, i will
try making a patch maybe early next week and send it for the x86 tree.
Thanks,
Alok
>
> > Even on native hardware if you reduce the timeout to less than 10ms it
> > may result in errors in the range of 2500ppm on a 2GHz systems when
> > calibrating against pmtimer/hpet, this is far worse than what NTP can
> > correct, afaik NTP can handle errors only upto 500ppm. And IMHO that is
> > the reason why we had a timeout of 50ms before (since it limits the
> > maximum theoretical error to 500ppm)
>
> I would not mind at all having the more precise thing happen _later_,
> especially if we can do it incrementally.
>
> One of the problems with the TSC calibration is that we need it fairly
> early (for things like usleep()), and it needs to be in the right
> ballpark. It definitely does not need to be in the parts-per-million
> range, it needs to be in the "within a few percent" range.
>
> (To make matters worse, the TSC isn't then even used in practice for
> real-time clocks, because of variable frequency and/or halting in idle
> states. So the actual real-time clock will actually be based on HPET or
> PM_TIMER anyway most of the time).
>
> Linus
next prev parent reply other threads:[~2008-09-04 18:31 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-04 15:18 Thomas Gleixner
2008-09-04 15:18 ` [RFC patch 1/4] x86: TSC: define the PIT latch value separate Thomas Gleixner
2008-09-04 15:18 ` [RFC patch 2/4] x86: TSC: separate hpet/pmtimer calculation out Thomas Gleixner
2008-09-04 15:18 ` [RFC patch 3/4] x86: TSC: use one set of reference variables Thomas Gleixner
2008-09-04 15:18 ` [RFC patch 4/4] x86: TSC make the calibration loop smarter Thomas Gleixner
2008-09-04 15:36 ` [RFC patch 0/4] TSC calibration improvements Ingo Molnar
2008-09-04 15:45 ` Linus Torvalds
2008-09-04 16:00 ` Ingo Molnar
2008-09-04 16:21 ` Linus Torvalds
2008-09-04 16:36 ` Ingo Molnar
2008-09-04 17:41 ` Linus Torvalds
2008-09-04 18:07 ` Alan Cox
2008-09-04 18:26 ` Linus Torvalds
2008-09-04 18:30 ` H. Peter Anvin
2008-09-04 20:09 ` Linus Torvalds
2008-09-04 20:43 ` Ingo Molnar
2008-09-04 20:52 ` Ingo Molnar
2008-09-04 21:09 ` Linus Torvalds
2008-09-04 21:21 ` Ingo Molnar
2008-09-04 21:30 ` Linus Torvalds
2008-09-04 21:34 ` Linus Torvalds
2008-09-04 21:39 ` Ingo Molnar
2008-09-04 21:33 ` Ingo Molnar
2008-09-05 22:18 ` Alok Kataria
2008-09-05 22:34 ` Linus Torvalds
2008-09-06 20:03 ` Thomas Gleixner
2008-09-06 20:29 ` Linus Torvalds
2008-09-06 20:37 ` Thomas Gleixner
2008-09-06 20:50 ` Linus Torvalds
2008-09-06 20:55 ` Linus Torvalds
2008-09-06 21:15 ` Thomas Gleixner
2008-09-06 21:22 ` Linus Torvalds
2008-09-06 21:30 ` Thomas Gleixner
2008-09-06 22:40 ` Ingo Molnar
2008-09-06 20:58 ` Thomas Gleixner
2008-09-06 21:10 ` Linus Torvalds
2008-09-07 6:01 ` Willy Tarreau
2008-09-06 20:52 ` Thomas Gleixner
2008-09-06 20:59 ` Linus Torvalds
2008-09-06 21:07 ` Thomas Gleixner
2008-09-06 21:15 ` Linus Torvalds
2008-09-06 21:26 ` Thomas Gleixner
2008-09-06 21:32 ` Linus Torvalds
2008-09-04 20:53 ` Linus Torvalds
2008-09-04 21:38 ` Alok Kataria
2008-09-04 21:52 ` Linus Torvalds
2008-09-04 22:09 ` Alok Kataria
2008-09-04 17:39 ` Alok Kataria
2008-09-04 17:53 ` Linus Torvalds
2008-09-04 18:31 ` Alok Kataria [this message]
2008-09-04 18:34 ` H. Peter Anvin
2008-09-04 21:00 ` Valdis.Kletnieks
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=1220553103.11753.39.camel@alok-dev1 \
--to=akataria@vmware.com \
--cc=arjan@infradead.org \
--cc=dhecht@vmware.com \
--cc=garrett@vmware.com \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®