All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dimitri Sivanich <sivanich@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] disable softlockup detection at boottime
Date: Wed, 23 Apr 2008 15:16:13 -0500	[thread overview]
Message-ID: <20080423201613.GA8546@sgi.com> (raw)

This patch allows softlockup detection to be disabled by specifying
a boottime parameter.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>

Index: linux/kernel/softlockup.c
===================================================================
--- linux.orig/kernel/softlockup.c	2008-04-23 13:50:06.000000000 -0500
+++ linux/kernel/softlockup.c	2008-04-23 14:39:36.267398531 -0500
@@ -24,6 +24,7 @@ static DEFINE_PER_CPU(unsigned long, tou
 static DEFINE_PER_CPU(unsigned long, print_timestamp);
 static DEFINE_PER_CPU(struct task_struct *, watchdog_task);
 
+static int __read_mostly softlockup_off;
 static int __read_mostly did_panic;
 unsigned long __read_mostly softlockup_thresh = 60;
 
@@ -53,7 +54,8 @@ void touch_softlockup_watchdog(void)
 {
 	int this_cpu = raw_smp_processor_id();
 
-	__raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu);
+	if (!softlockup_off)
+		__raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu);
 }
 EXPORT_SYMBOL(touch_softlockup_watchdog);
 
@@ -61,6 +63,9 @@ void touch_all_softlockup_watchdogs(void
 {
 	int cpu;
 
+	if (softlockup_off)
+		return;
+
 	/* Cause each CPU to re-update its timestamp rather than complain */
 	for_each_online_cpu(cpu)
 		per_cpu(touch_timestamp, cpu) = 0;
@@ -79,6 +84,9 @@ void softlockup_tick(void)
 	struct pt_regs *regs = get_irq_regs();
 	unsigned long now;
 
+	if (softlockup_off)
+		return;
+
 	if (touch_timestamp == 0) {
 		touch_softlockup_watchdog();
 		return;
@@ -306,9 +314,19 @@ __init void spawn_softlockup_task(void)
 	void *cpu = (void *)(long)smp_processor_id();
 	int err = cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu);
 
+	if (softlockup_off)
+		return;
+
 	BUG_ON(err == NOTIFY_BAD);
 	cpu_callback(&cpu_nfb, CPU_ONLINE, cpu);
 	register_cpu_notifier(&cpu_nfb);
 
 	atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
 }
+
+static int __init disable_softlockup_detection(char *str)
+{
+	softlockup_off = 1;
+	return 1;
+}
+__setup("nosoftlockup", disable_softlockup_detection);

             reply	other threads:[~2008-04-23 20:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 20:16 Dimitri Sivanich [this message]
2008-04-23 21:55 ` [PATCH] disable softlockup detection at boottime Randy Dunlap
2008-04-23 22:24   ` Dimitri Sivanich
2008-04-28 16:55 ` Ingo Molnar
2008-04-28 18:52   ` Dimitri Sivanich
2008-04-29 12:35     ` Ingo Molnar
2008-04-29 12:44       ` Dimitri Sivanich
2008-04-29 14:13         ` Ingo Molnar

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=20080423201613.GA8546@sgi.com \
    --to=sivanich@sgi.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.