* [patch] x86, tsc: skip TSC synchronization checks for tsc=reliable
@ 2011-11-04 22:42 Suresh Siddha
2011-11-07 18:06 ` john stultz
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Suresh Siddha @ 2011-11-04 22:42 UTC (permalink / raw)
To: Thomas Gleixner, H Peter Anvin, Ingo Molnar, john stultz; +Cc: linux-kernel
tsc=reliable boot parameter is supposed to skip all the TSC stablility
checks during boot time.
On a 8-socket system where we want to run an experiment with the
"tsc=reliable" boot option, TSC synchronization checks are not
getting skipped and marking the TSC as not stable.
Check for tsc_clocksource_reliable (which is set via tsc=reliable or
for platforms supporting synthetic TSC_RELIABLE feature bit etc)
and when set, skip the TSC synchronization tests during boot.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
arch/x86/include/asm/tsc.h | 2 ++
arch/x86/kernel/tsc.c | 2 +-
arch/x86/kernel/tsc_sync.c | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h
index 83e2efd..15d9915 100644
--- a/arch/x86/include/asm/tsc.h
+++ b/arch/x86/include/asm/tsc.h
@@ -51,6 +51,8 @@ extern int unsynchronized_tsc(void);
extern int check_tsc_unstable(void);
extern unsigned long native_calibrate_tsc(void);
+extern int tsc_clocksource_reliable;
+
/*
* Boot-time check whether the TSCs are synchronized across
* all CPUs/cores:
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index db48336..eee4651 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -35,7 +35,7 @@ static int __read_mostly tsc_unstable;
erroneous rdtsc usage on !cpu_has_tsc processors */
static int __read_mostly tsc_disabled = -1;
-static int tsc_clocksource_reliable;
+int tsc_clocksource_reliable;
/*
* Scheduler clock - returns current time in nanosec units.
*/
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index 0aa5fed8..9eba29b 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -113,7 +113,7 @@ void __cpuinit check_tsc_sync_source(int cpu)
if (unsynchronized_tsc())
return;
- if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) {
+ if (tsc_clocksource_reliable) {
if (cpu == (nr_cpu_ids-1) || system_state != SYSTEM_BOOTING)
pr_info(
"Skipped synchronization checks as TSC is reliable.\n");
@@ -172,7 +172,7 @@ void __cpuinit check_tsc_sync_target(void)
{
int cpus = 2;
- if (unsynchronized_tsc() || boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
+ if (unsynchronized_tsc() || tsc_clocksource_reliable)
return;
/*
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] x86, tsc: skip TSC synchronization checks for tsc=reliable
2011-11-04 22:42 [patch] x86, tsc: skip TSC synchronization checks for tsc=reliable Suresh Siddha
@ 2011-11-07 18:06 ` john stultz
2011-11-07 19:36 ` Srivatsa S. Bhat
2011-12-05 18:03 ` [tip:timers/core] x86, tsc: Skip " tip-bot for Suresh Siddha
2 siblings, 0 replies; 4+ messages in thread
From: john stultz @ 2011-11-07 18:06 UTC (permalink / raw)
To: Suresh Siddha; +Cc: Thomas Gleixner, H Peter Anvin, Ingo Molnar, linux-kernel
On Fri, 2011-11-04 at 15:42 -0700, Suresh Siddha wrote:
> tsc=reliable boot parameter is supposed to skip all the TSC stablility
> checks during boot time.
>
> On a 8-socket system where we want to run an experiment with the
> "tsc=reliable" boot option, TSC synchronization checks are not
> getting skipped and marking the TSC as not stable.
>
> Check for tsc_clocksource_reliable (which is set via tsc=reliable or
> for platforms supporting synthetic TSC_RELIABLE feature bit etc)
> and when set, skip the TSC synchronization tests during boot.
>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Looks like a nice cleanup of the tsc=reliable semantics.
Acked-by: John Stultz <johnstul@us.ibm.com>
thanks
-john
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] x86, tsc: skip TSC synchronization checks for tsc=reliable
2011-11-04 22:42 [patch] x86, tsc: skip TSC synchronization checks for tsc=reliable Suresh Siddha
2011-11-07 18:06 ` john stultz
@ 2011-11-07 19:36 ` Srivatsa S. Bhat
2011-12-05 18:03 ` [tip:timers/core] x86, tsc: Skip " tip-bot for Suresh Siddha
2 siblings, 0 replies; 4+ messages in thread
From: Srivatsa S. Bhat @ 2011-11-07 19:36 UTC (permalink / raw)
To: Suresh Siddha
Cc: Thomas Gleixner, H Peter Anvin, Ingo Molnar, john stultz,
linux-kernel
Hi,
On 11/05/2011 04:12 AM, Suresh Siddha wrote:
> tsc=reliable boot parameter is supposed to skip all the TSC stablility
> checks during boot time.
>
> On a 8-socket system where we want to run an experiment with the
> "tsc=reliable" boot option, TSC synchronization checks are not
> getting skipped and marking the TSC as not stable.
>
I was facing this same problem some time back with some of my machines.
> Check for tsc_clocksource_reliable (which is set via tsc=reliable or
> for platforms supporting synthetic TSC_RELIABLE feature bit etc)
> and when set, skip the TSC synchronization tests during boot.
>
This patch fixes the issue. Thanks for the fix!
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Thanks,
Srivatsa S. Bhat
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:timers/core] x86, tsc: Skip TSC synchronization checks for tsc=reliable
2011-11-04 22:42 [patch] x86, tsc: skip TSC synchronization checks for tsc=reliable Suresh Siddha
2011-11-07 18:06 ` john stultz
2011-11-07 19:36 ` Srivatsa S. Bhat
@ 2011-12-05 18:03 ` tip-bot for Suresh Siddha
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Suresh Siddha @ 2011-12-05 18:03 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, johnstul, suresh.b.siddha,
srivatsa.bhat, tglx, mingo
Commit-ID: 28a00184be261e3dc152ba0d664a067bbe235b6a
Gitweb: http://git.kernel.org/tip/28a00184be261e3dc152ba0d664a067bbe235b6a
Author: Suresh Siddha <suresh.b.siddha@intel.com>
AuthorDate: Fri, 4 Nov 2011 15:42:17 -0700
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 5 Dec 2011 18:00:31 +0100
x86, tsc: Skip TSC synchronization checks for tsc=reliable
tsc=reliable boot parameter is supposed to skip all the TSC
stablility checks during boot time.
On a 8-socket system where we want to run an experiment with the
"tsc=reliable" boot option, TSC synchronization checks are not
getting skipped and marking the TSC as not stable.
Check for tsc_clocksource_reliable (which is set via
tsc=reliable or for platforms supporting synthetic TSC_RELIABLE
feature bit etc) and when set, skip the TSC synchronization
tests during boot.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Tested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1320446537.15071.14.camel@sbsiddha-desk.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/include/asm/tsc.h | 2 ++
arch/x86/kernel/tsc.c | 2 +-
arch/x86/kernel/tsc_sync.c | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h
index 83e2efd..15d9915 100644
--- a/arch/x86/include/asm/tsc.h
+++ b/arch/x86/include/asm/tsc.h
@@ -51,6 +51,8 @@ extern int unsynchronized_tsc(void);
extern int check_tsc_unstable(void);
extern unsigned long native_calibrate_tsc(void);
+extern int tsc_clocksource_reliable;
+
/*
* Boot-time check whether the TSCs are synchronized across
* all CPUs/cores:
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index db48336..eee4651 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -35,7 +35,7 @@ static int __read_mostly tsc_unstable;
erroneous rdtsc usage on !cpu_has_tsc processors */
static int __read_mostly tsc_disabled = -1;
-static int tsc_clocksource_reliable;
+int tsc_clocksource_reliable;
/*
* Scheduler clock - returns current time in nanosec units.
*/
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index 0aa5fed8..9eba29b 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -113,7 +113,7 @@ void __cpuinit check_tsc_sync_source(int cpu)
if (unsynchronized_tsc())
return;
- if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) {
+ if (tsc_clocksource_reliable) {
if (cpu == (nr_cpu_ids-1) || system_state != SYSTEM_BOOTING)
pr_info(
"Skipped synchronization checks as TSC is reliable.\n");
@@ -172,7 +172,7 @@ void __cpuinit check_tsc_sync_target(void)
{
int cpus = 2;
- if (unsynchronized_tsc() || boot_cpu_has(X86_FEATURE_TSC_RELIABLE))
+ if (unsynchronized_tsc() || tsc_clocksource_reliable)
return;
/*
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-05 18:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-04 22:42 [patch] x86, tsc: skip TSC synchronization checks for tsc=reliable Suresh Siddha
2011-11-07 18:06 ` john stultz
2011-11-07 19:36 ` Srivatsa S. Bhat
2011-12-05 18:03 ` [tip:timers/core] x86, tsc: Skip " tip-bot for Suresh Siddha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox