From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Alok Kataria <akataria@vmware.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
LKML <linux-kernel@vger.kernel.org>,
Arjan van de Veen <arjan@infradead.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Dan Hecht <dhecht@vmware.com>, Garrett Smith <garrett@vmware.com>
Subject: Re: [RFC patch 0/4] TSC calibration improvements
Date: Sun, 7 Sep 2008 00:40:16 +0200 [thread overview]
Message-ID: <20080906224016.GA9229@elte.hu> (raw)
In-Reply-To: <alpine.LFD.1.10.0809061351170.3117@nehalem.linux-foundation.org>
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
> "expect" is an unsigned char. There are absolutely _zero_ issues with
> overflow, underflow, random phases of the moon, madness levels or
> anything else. But yes, it does look like Ingo screwed up when adding
> that final check, since expect was already decremented at the end of
> the loop.
>
> Ingo? Did you actually test it?
hm, yes, that's my brown paper bag fault, sorry.
I did that addition in tip/x86/tsc and posted it to you and i did test
it immediately - and i noticed that i never saw the fast-calibration
message i expected to see. I even pasted the boot log over irc yesterday
and i still have it:
*> [ 0.000] TSC: PIT calibration deviates from PMTIMER: 738839 846296.
*> [ 0.000] TSC: Using PIT calibration value
*> [ 0.000] Detected 738.839 MHz processor.
*> does not seem to trigger anywhere
i wanted to debug that problem straight after i worked down my 800+
mails post-vacation mbox :-/ Which state i reached about 2 hours ago so
i'm now free - the fix is below.
i _think_ that the quality of calibration should now be pretty OK with
latest -git. The clever fast calibration stuff could be .28 material.
And/or we could change the 5x 50msec calibration to 3x 30msec right now,
the precision is still plenty and the 90 msec is then replaced with your
fast-calibrate method anyway on proper boxes. Hm?
Ingo
------------------->
>From 5df45515512436a808d3476a90e83f2efb022422 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Sat, 6 Sep 2008 23:55:40 +0200
Subject: [PATCH] x86, tsc calibration: fix
my brown paperbag day ...
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/tsc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 6dab90f..4847a92 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -319,7 +319,7 @@ static unsigned long quick_pit_calibrate(void)
/*
* Make sure we can rely on the second TSC timestamp:
*/
- if (!pit_expect_msb(--expect))
+ if (!pit_expect_msb(expect))
goto failed;
/*
next prev parent reply other threads:[~2008-09-06 22:40 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-04 15:18 [RFC patch 0/4] TSC calibration improvements 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 [this message]
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
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=20080906224016.GA9229@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=akataria@vmware.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=dhecht@vmware.com \
--cc=garrett@vmware.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--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 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.