From: Luming Yu <luming.yu@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Subject: [RFC patch] reset TSC at the begining of check_tsc_warp
Date: Mon, 1 Jun 2009 17:01:53 +0800 [thread overview]
Message-ID: <3877989d0906010201j438a08a8x559f62b0aed40696@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]
Hello,
Without this patch, we always get kernel warning that TSC warp between CPUs,
and TSC is marked unstable due to check_tsc_sync_source failed if the CPUs
have the problem of not-synced initial TSC.
It hurts CPUs with constant-tsc feature, but with unsynced initial TSC value...
The downside is we could break perfect synced TSC with this patch.
Please review, test and apply.
**The patch is enclosed in text attachment*
**Using web client to send the patch* *
**below is c&p just for review, please apply attached patch*/
Thanks,
Luming
Signed-off-by: Yu Luming <luming.yu@intel.com>
tsc_sync.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index bf36328..190c1b0 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -46,6 +46,7 @@ static __cpuinit void check_tsc_warp(void)
cycles_t start, now, prev, end;
int i;
+ wrmsrl(MSR_IA32_TSC, 0);
rdtsc_barrier();
start = get_cycles();
rdtsc_barrier();
[-- Attachment #2: 2.patch --]
[-- Type: application/octet-stream, Size: 360 bytes --]
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index bf36328..190c1b0 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -46,6 +46,7 @@ static __cpuinit void check_tsc_warp(void)
cycles_t start, now, prev, end;
int i;
+ wrmsrl(MSR_IA32_TSC, 0);
rdtsc_barrier();
start = get_cycles();
rdtsc_barrier();
next reply other threads:[~2009-06-01 9:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 9:01 Luming Yu [this message]
2009-06-01 23:10 ` Frans Pop
2009-06-02 7:05 ` Luming Yu
2009-06-02 7:54 ` Andi Kleen
2009-06-02 8:28 ` Luming Yu
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=3877989d0906010201j438a08a8x559f62b0aed40696@mail.gmail.com \
--to=luming.yu@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®