]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
x86/tsc: Add option to disable tsc clocksource watchdog
authorJuri Lelli <juri.lelli@redhat.com>
Thu, 7 Mar 2019 12:09:13 +0000 (13:09 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 22 Mar 2019 13:14:58 +0000 (14:14 +0100)
Clocksource watchdog has been found responsible for generating latency
spikes (in the 10-20 us range) when woken up to check for TSC stability.

Add an option to disable it at boot.

Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: bigeasy@linutronix.de
Cc: linux-rt-users@vger.kernel.org
Cc: peterz@infradead.org
Cc: bristot@redhat.com
Cc: williams@redhat.com
Link: https://lkml.kernel.org/r/20190307120913.13168-1-juri.lelli@redhat.com
Documentation/admin-guide/kernel-parameters.txt
arch/x86/kernel/tsc.c

index 2b8ee90bb64470d0d6d6ccadccf8b8fbbf86509d..c4d830003b215c38c6387f381049ba8c4b219d25 100644 (file)
                        [x86] unstable: mark the TSC clocksource as unstable, this
                        marks the TSC unconditionally unstable at bootup and
                        avoids any further wobbles once the TSC watchdog notices.
+                       [x86] nowatchdog: disable clocksource watchdog. Used
+                       in situations with strict latency requirements (where
+                       interruptions from clocksource watchdog are not
+                       acceptable).
 
        turbografx.map[2|3]=    [HW,JOY]
                        TurboGraFX parallel port interface
index 3fae238340699376ef2b5f84d4b6d4c7f60c48c5..aab0c82e0a0d7c227b7926d92ea1eb8b590da785 100644 (file)
@@ -283,6 +283,7 @@ int __init notsc_setup(char *str)
 __setup("notsc", notsc_setup);
 
 static int no_sched_irq_time;
+static int no_tsc_watchdog;
 
 static int __init tsc_setup(char *str)
 {
@@ -292,6 +293,8 @@ static int __init tsc_setup(char *str)
                no_sched_irq_time = 1;
        if (!strcmp(str, "unstable"))
                mark_tsc_unstable("boot parameter");
+       if (!strcmp(str, "nowatchdog"))
+               no_tsc_watchdog = 1;
        return 1;
 }
 
@@ -1349,7 +1352,7 @@ static int __init init_tsc_clocksource(void)
        if (tsc_unstable)
                goto unreg;
 
-       if (tsc_clocksource_reliable)
+       if (tsc_clocksource_reliable || no_tsc_watchdog)
                clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
 
        if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC_S3))