aboutsummaryrefslogtreecommitdiff
path: root/init/Kconfig
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2011-03-16 19:04:18 -0400
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2011-03-16 19:04:18 -0400
commit2b5bd1289ed65c0c39aacd0932461bb04e6b546f (patch)
treee631e72aa563507090ecf12a645fe25b3941f793 /init/Kconfig
parent4ede9efaf07eedf3ba0afcd9e4a609d7589780ab (diff)
trace-clock/test-tsc-sync
LTTng - TSC synchronicity test Test TSC synchronization across CPUs. Architecture independant and can therefore be used on various architectures. Aims at testing the TSC synchronization on a running system (not only at early boot), with minimal impact on interrupt latency. I've written this code before x86 tsc_sync.c existed and given it worked well for my needs, I never switched to tsc_sync.c. Although it has the same goal, it does it a bit differently : tsc_sync looks at the cycle counters on two CPUs to see if one compared to the other are going backward when read in loop. The LTTng code synchronizes both cores with a counter used as a memory barrier and then reads the two TSCs at a delta equal to the cache line exchange. Instruction and data caches are primed. This test is repeated in loops to insure we deal with MCE, NMIs which could skew the results. The problem I see with tsc_sync.c is that is one of the two CPUs is delayed by an interrupt handler (for way too long) while the other CPU is doing its check_tsc_warp() execution, and if the CPU with the lowest TSC values runs first, this code will fail to detect unsynchronized CPUs. This sync test code does not have this problem. A following patch replaces the x86 tsc_sync.c code by this architecture independant code. This code also adds the kernel parameter force_tsc_sync=1 which forces resynchronization of CPU TSCs when a CPU is hotplugged. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: Ingo Molnar <mingo@redhat.com> CC: Jan Kiszka <jan.kiszka@siemens.com> CC: Linus Torvalds <torvalds@linux-foundation.org> CC: Andrew Morton <akpm@linux-foundation.org> CC: Peter Zijlstra <a.p.zijlstra@chello.nl> CC: Thomas Gleixner <tglx@linutronix.de> CC: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'init/Kconfig')
-rw-r--r--init/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index f56ad689d02..29cb97ef0bd 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -711,6 +711,13 @@ config HAVE_TRACE_CLOCK_GENERIC
config HAVE_TRACE_CLOCK_32_TO_64
def_bool n
+#
+# Architectures which need to dynamically detect if their TSC is unsynchronized
+# across cpus should select this.
+#
+config HAVE_UNSYNCHRONIZED_TSC
+ def_bool n
+
menuconfig CGROUP_SCHED
bool "Group CPU scheduler"
depends on EXPERIMENTAL