From: Mike Galbraith <efault@gmx.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Subject: Re: [patch?] s2ram + P4 + tsc = annoyance
Date: Thu, 27 Dec 2007 19:19:34 +0100 [thread overview]
Message-ID: <1198779574.4425.50.camel@homer.simson.net> (raw)
In-Reply-To: <1198745736.4235.23.camel@homer.simson.net>
Or, reset to pristine prior to testing, though that's more lines to
accomplish the same thing. Either way, or some other way...
If check_tsc_warp() is called after initial boot, and the TSC has in the
meantime been set (BIOS, user, silicon, elves) to a value lower than the
last stored/stale value, we blame the TSC. Reset to pristine condition
after every test.
Signed-off-by: Mike Galbraith <efault@gmx.de>
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index 9125efe..05d8f25 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -129,24 +129,24 @@ void __cpuinit check_tsc_sync_source(int cpu)
while (atomic_read(&stop_count) != cpus-1)
cpu_relax();
- /*
- * Reset it - just in case we boot another CPU later:
- */
- atomic_set(&start_count, 0);
-
if (nr_warps) {
printk("\n");
printk(KERN_WARNING "Measured %Ld cycles TSC warp between CPUs,"
" turning off TSC clock.\n", max_warp);
mark_tsc_unstable("check_tsc_sync_source failed");
- nr_warps = 0;
- max_warp = 0;
- last_tsc = 0;
} else {
printk(" passed.\n");
}
/*
+ * Reset it - just in case we boot another CPU later:
+ */
+ atomic_set(&start_count, 0);
+ nr_warps = 0;
+ max_warp = 0;
+ last_tsc = 0;
+
+ /*
* Let the target continue with the bootup:
*/
atomic_inc(&stop_count);
next prev parent reply other threads:[~2007-12-27 18:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-27 8:55 [patch?] s2ram + P4 + tsc = annoyance Mike Galbraith
2007-12-27 18:19 ` Mike Galbraith [this message]
2007-12-30 14:04 ` Ingo Molnar
2007-12-30 14:08 ` Ingo Molnar
2007-12-30 17:42 ` Mike Galbraith
2008-01-04 16:39 ` Pavel Machek
2008-01-04 22:04 ` Mike Galbraith
2008-01-05 9:06 ` Ingo Molnar
[not found] <fa./Gg6lFn4vN7sfhp2nE3LSMDm0q4@ifi.uio.no>
2007-12-27 18:09 ` Robert Hancock
2007-12-27 18:27 ` Mike Galbraith
2007-12-27 18:40 ` Mike Galbraith
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=1198779574.4425.50.camel@homer.simson.net \
--to=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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