[lkml]   [2006]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch 13/19] GTOD: Mark TSC unusable for highres timers
From: Thomas Gleixner <>

The TSC is too unstable and unreliable to be used with high resolution timers.
The automatic detection of TSC unstability fails once we switched to high
resolution mode, because the tick emulation would use the TSC as reference.
This results in a circular dependency. Mark it unusable for high res upfront.

[ updated for i386-time-avoid-pit-smp-lockups.patch]
Signed-off-by: Thomas Gleixner <>
Signed-off-by: Ingo Molnar <>

diff -puN arch/i386/kernel/tsc.c~gtod-mark-tsc-unusable-for-highres-timers arch/i386/kernel/tsc.c
--- a/arch/i386/kernel/tsc.c~gtod-mark-tsc-unusable-for-highres-timers
+++ a/arch/i386/kernel/tsc.c
@@ -459,10 +459,23 @@ static int __init init_tsc_clocksource(v
current_tsc_khz = tsc_khz;
clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
/* lower the rating if we already know its unstable: */
if (check_tsc_unstable())
clocksource_tsc.rating = 0;
+ /*
+ * Mark TSC unsuitable for high resolution timers. TSC has so
+ * many pitfalls: frequency changes, stop in idle ... When we
+ * switch to high resolution mode we can not longer detect a
+ * firmware caused frequency change, as the emulated tick uses
+ * TSC as reference. This results in a circular dependency.
+ * Switch only to high resolution mode, if pm_timer or such
+ * is available.
+ */
+ clocksource_tsc.rating = 50;
+ clocksource_tsc.is_continuous = 0;
verify_tsc_freq_timer.function = verify_tsc_freq;
verify_tsc_freq_timer.expires =

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-11-10 00:49    [from the cache]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site