From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, shai@scalex86.org
Subject: [patch] Change softlockup trigger limit using a kernel parameter
Date: Mon, 16 Jul 2007 15:26:50 -0700 [thread overview]
Message-ID: <20070716222650.GA5947@localdomain> (raw)
Kernel warns of softlockups if the softlockup thread is not able to run
on a CPU for 10s. It is useful to lower the softlockup warning
threshold in testing environments to catch potential lockups early.
Following patch adds a kernel parameter 'softlockup_lim' to control
the softlockup threshold.
Thanks,
Kiran
Control the trigger limit for softlockup warnings. This is useful for
debugging softlockups, by lowering the softlockup_lim to identify
possible softlockups earlier.
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Index: linux-2.6.22/Documentation/kernel-parameters.txt
===================================================================
--- linux-2.6.22.orig/Documentation/kernel-parameters.txt 2007-07-08 16:32:17.000000000 -0700
+++ linux-2.6.22/Documentation/kernel-parameters.txt 2007-07-16 14:07:34.907116001 -0700
@@ -1781,6 +1781,10 @@ and is between 256 and 4096 characters.
snd-ymfpci= [HW,ALSA]
+ softlockup_lim=
+ [KNL] Soft lock up tolerance limit in seconds
+ { 1 - 10 }
+
sonycd535= [HW,CD]
Format: <io>[,<irq>]
Index: linux-2.6.22/kernel/softlockup.c
===================================================================
--- linux-2.6.22.orig/kernel/softlockup.c 2007-07-08 16:32:17.000000000 -0700
+++ linux-2.6.22/kernel/softlockup.c 2007-07-11 12:50:05.280460591 -0700
@@ -21,6 +21,7 @@ static DEFINE_PER_CPU(unsigned long, pri
static DEFINE_PER_CPU(struct task_struct *, watchdog_task);
static int did_panic = 0;
+static int softlockup_lim = 10;
static int
softlock_panic(struct notifier_block *this, unsigned long event, void *ptr)
@@ -34,6 +35,20 @@ static struct notifier_block panic_block
.notifier_call = softlock_panic,
};
+static int __init softlockup_lim_setup(char *str)
+{
+ int lim = simple_strtol(str, NULL, 0);
+ if(lim > 0 && lim <= 10) {
+ softlockup_lim = lim;
+ } else {
+ printk("%s: Invalid softlockup_lim parameter. ", __func__);
+ printk("Using defaults.\n");
+ }
+ return 1;
+}
+
+__setup("softlockup_lim=", softlockup_lim_setup);
+
/*
* Returns seconds, approximately. We don't need nanosecond
* resolution, and we don't need to waste time with a big divide when
@@ -97,7 +112,7 @@ void softlockup_tick(void)
wake_up_process(per_cpu(watchdog_task, this_cpu));
/* Warn about unreasonable 10+ seconds delays: */
- if (now > (touch_timestamp + 10)) {
+ if (now > (touch_timestamp + softlockup_lim)) {
per_cpu(print_timestamp, this_cpu) = touch_timestamp;
spin_lock(&print_lock);
next reply other threads:[~2007-07-16 22:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-16 22:26 Ravikiran G Thirumalai [this message]
2007-07-18 23:08 ` Andrew Morton
2007-07-19 5:41 ` Ravikiran G Thirumalai
2007-07-19 6:09 ` Andrew Morton
2007-07-19 9:11 ` Ingo Molnar
2007-07-19 18:31 ` Ravikiran G Thirumalai
2007-07-19 18:45 ` Ingo Molnar
2007-07-19 18:51 ` Jeremy Fitzhardinge
2007-07-20 3:12 ` Ravikiran G Thirumalai
2007-07-20 5:27 ` Ravikiran G Thirumalai
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=20070716222650.GA5947@localdomain \
--to=kiran@scalex86.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shai@scalex86.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome