mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luming Yu <luming.yu@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Subject: [RFC patch] need check TSC wrap unconditionally
Date: Fri, 14 Aug 2009 12:15:00 +0800	[thread overview]
Message-ID: <3877989d0908132115n6d8c7caej4bc4c87ae7701cac@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]

Hi there,

we disabled tsc wrap check on any platform that has NOSTOP_TSC cpu. But this
will cause some real problem.For example, 1.CPU does has constant and
non_stop tsc, which means different CPU ticks at same rate in same domain,but
have been given different initial TSC value.Then at any given time,
CPUsare unsynchronized.
2. if those CPUs are sit in different domain..(multi-chassis cluster system?)

Please review. If make sense, please apply.

**The patch is enclosed in text attachment*
**Using web client to send the patch* *
**below is for review, please apply attached  patch*/

Thanks,
Luming

Signed-off-by: Yu Luming <luming.yu@intel.com>

 arch/x86/kernel/tsc_sync.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index 027b5b4..312ba84 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -113,11 +113,6 @@ void __cpuinit check_tsc_sync_source(int cpu)
        if (unsynchronized_tsc())
                return;

-       if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) {
-               pr_info("Skipping synchronization checks as TSC is
reliable.\n");
-               return;
-       }
-
        pr_info("checking TSC synchronization [CPU#%d -> CPU#%d]:",
                smp_processor_id(), cpu);

@@ -171,7 +166,7 @@ void __cpuinit check_tsc_sync_target(void)
 {
        int cpus = 2;

-       if (unsynchronized_tsc() || boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
+       if (unsynchronized_tsc())
                return;

        /*

[-- Attachment #2: 7 --]
[-- Type: application/octet-stream, Size: 700 bytes --]

diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index 027b5b4..312ba84 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -113,11 +113,6 @@ void __cpuinit check_tsc_sync_source(int cpu)
 	if (unsynchronized_tsc())
 		return;
 
-	if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) {
-		pr_info("Skipping synchronization checks as TSC is reliable.\n");
-		return;
-	}
-
 	pr_info("checking TSC synchronization [CPU#%d -> CPU#%d]:",
 		smp_processor_id(), cpu);
 
@@ -171,7 +166,7 @@ void __cpuinit check_tsc_sync_target(void)
 {
 	int cpus = 2;
 
-	if (unsynchronized_tsc() || boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
+	if (unsynchronized_tsc())
 		return;
 
 	/*

             reply	other threads:[~2009-08-14  4:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14  4:15 Luming Yu [this message]
2009-08-21 16:37 ` Peter Zijlstra
2009-08-24  2:30   ` 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=3877989d0908132115n6d8c7caej4bc4c87ae7701cac@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®