From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, dwalker@mvista.com
Subject: Re: [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-01
Date: Mon, 1 Aug 2005 22:52:08 +0200 [thread overview]
Message-ID: <20050801205208.GA20731@elte.hu> (raw)
In-Reply-To: <1122920564.6759.15.camel@localhost.localdomain>
* Steven Rostedt <rostedt@goodmis.org> wrote:
> Ingo,
>
> What's with the "BUG: possible soft lockup detected on CPU..."? I'm
> getting a bunch of them from the IDE interrupt. It's not locking up,
> but it does things that probably do take some time. Is this really
> necessary? Here's an example dump:
doh - it's Daniel not Cc:-ing lkml when sending me patches, so people
dont know what's going on ...
here's the patch below. Could you try to revert it?
Ingo
On Sun, 2005-07-31 at 20:27 +0200, Ingo Molnar wrote:
> looks good, but i'd suggest to use printk_ratelimit(). (and the use of
> u16 can be a performance hit on x86 due to potential 16-bit prefixes -
> the best thing to use is an 'int' on pretty much every arch. with
> printk_ratelimit() this flag go away anyway.)
Ok, here's with your suggestions.
Index: linux-2.6.12/kernel/softlockup.c
===================================================================
--- linux-2.6.12.orig/kernel/softlockup.c 2005-07-31 15:31:09.000000000 +0000
+++ linux-2.6.12/kernel/softlockup.c 2005-07-31 18:43:35.000000000 +0000
@@ -9,6 +9,7 @@
#include <linux/mm.h>
#include <linux/cpu.h>
+#include <linux/sched.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/kthread.h>
@@ -19,6 +20,7 @@ static DEFINE_RAW_SPINLOCK(print_lock);
static DEFINE_PER_CPU(unsigned long, timeout) = INITIAL_JIFFIES;
static DEFINE_PER_CPU(unsigned long, timestamp) = INITIAL_JIFFIES;
static DEFINE_PER_CPU(unsigned long, print_timestamp) = INITIAL_JIFFIES;
+static DEFINE_PER_CPU(struct task_struct *, prev_task);
static DEFINE_PER_CPU(struct task_struct *, watchdog_task);
static int did_panic = 0;
@@ -56,6 +58,23 @@ void softlockup_tick(void)
if (!per_cpu(watchdog_task, this_cpu))
return;
+ if (per_cpu(prev_task, this_cpu) != current ||
+ !rt_task(current)) {
+ per_cpu(prev_task, this_cpu) = current;
+ }
+ else if (printk_ratelimit()) {
+
+ spin_lock(&print_lock);
+ printk(KERN_ERR "BUG: possible soft lockup detected on CPU#%u! %lu-%lu(%lu)\n",
+ this_cpu, jiffies, timestamp, timeout);
+ dump_stack();
+#if defined(__i386__) && defined(CONFIG_SMP)
+ nmi_show_all_regs();
+#endif
+ spin_unlock(&print_lock);
+
+ }
+
wake_up_process(per_cpu(watchdog_task, this_cpu));
per_cpu(timeout, this_cpu) = jiffies + msecs_to_jiffies(1000);
}
@@ -71,7 +90,7 @@ void softlockup_tick(void)
per_cpu(print_timestamp, this_cpu) = timestamp;
spin_lock(&print_lock);
- printk(KERN_ERR "BUG: soft lockup detected on CPU#%d! %ld-%ld(%ld)\n",
+ printk(KERN_ERR "BUG: soft lockup detected on CPU#%u! %lu-%lu(%lu)\n",
this_cpu, jiffies, timestamp, timeout);
dump_stack();
#if defined(__i386__) && defined(CONFIG_SMP)
next prev parent reply other threads:[~2005-08-01 20:56 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-30 16:03 [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-01 Ingo Molnar
2005-07-30 20:47 ` Peter Zijlstra
2005-07-30 20:52 ` Ingo Molnar
2005-07-31 4:47 ` Lee Revell
2005-07-31 6:38 ` Ingo Molnar
2005-08-01 4:45 ` Lee Revell
2005-08-01 21:08 ` Ingo Molnar
2005-08-01 21:12 ` Ingo Molnar
2005-08-02 13:56 ` Steven Rostedt
2005-08-02 14:05 ` Lee Revell
2005-08-02 14:20 ` Steven Rostedt
2005-08-02 15:37 ` 2.6.13-rc3 -> sluggish PS2 keyboard (was Re: [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-01) Lee Revell
2005-08-02 15:44 ` Vojtech Pavlik
2005-08-02 15:46 ` Lee Revell
2005-08-02 15:47 ` Lee Revell
2005-08-02 15:53 ` Steven Rostedt
2005-08-02 15:55 ` Vojtech Pavlik
2005-08-02 15:55 ` Dmitry Torokhov
2005-08-02 15:38 ` [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-01 Lee Revell
2005-07-31 8:03 ` Peter Zijlstra
2005-07-31 10:44 ` Ingo Molnar
2005-07-31 15:56 ` [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-05 Gene Heskett
2005-08-01 18:22 ` [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-01 Steven Rostedt
2005-08-01 19:49 ` Steven Rostedt
2005-08-01 20:52 ` Ingo Molnar [this message]
2005-08-01 21:09 ` Daniel Walker
2005-08-01 21:15 ` Ingo Molnar
2005-08-02 0:43 ` Steven Rostedt
2005-08-01 21:15 ` Steven Rostedt
2005-08-01 21:23 ` Ingo Molnar
2005-08-01 21:20 ` Daniel Walker
2005-08-02 0:53 ` Steven Rostedt
2005-08-02 10:19 ` Ingo Molnar
2005-08-02 19:45 ` Steven Rostedt
2005-08-02 19:56 ` Steven Rostedt
2005-08-02 23:38 ` Daniel Walker
2005-08-03 0:00 ` Steven Rostedt
2005-08-03 1:12 ` George Anzinger
2005-08-03 1:48 ` Keith Owens
2005-08-03 2:12 ` George Anzinger
2005-08-03 2:25 ` Daniel Walker
2005-08-03 2:42 ` Steven Rostedt
2005-08-03 2:58 ` Daniel Walker
2005-08-03 10:30 ` Steven Rostedt
2005-08-03 15:10 ` Daniel Walker
2005-08-03 10:37 ` [Question] arch-independent way to differentiate between user and kernel Steven Rostedt
2005-08-03 10:48 ` Ingo Molnar
2005-08-03 12:18 ` Steven Rostedt
2005-08-03 10:56 ` [Question] arch-independent way to differentiate between user andkernel linux-os (Dick Johnson)
2005-08-03 11:44 ` Steven Rostedt
2005-08-03 12:04 ` Ingo Molnar
2005-08-03 12:30 ` Steven Rostedt
2005-08-03 14:50 ` [patch] Real-Time Preemption, -RT-2.6.13-rc4-V0.7.52-01 Steven Rostedt
2005-08-03 15:15 ` Steven Rostedt
2005-08-03 15:57 ` Steven Rostedt
2005-08-03 16:44 ` Steven Rostedt
[not found] ` <20050812125844.GA13357@elte.hu>
2005-08-26 4:24 ` Steven Rostedt
2005-08-26 6:08 ` Ingo Molnar
2005-08-26 11:20 ` Steven Rostedt
2005-08-30 10:58 ` Stephen C. Tweedie
2005-08-30 11:14 ` Ingo Molnar
2005-08-30 11:00 ` Stephen C. Tweedie
2005-08-02 3:55 ` Steven Rostedt
2005-08-02 4:07 ` Daniel Walker
2005-08-02 14:53 ` Steven Rostedt
2005-08-04 12:20 ` Andrzej Nowak
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=20050801205208.GA20731@elte.hu \
--to=mingo@elte.hu \
--cc=dwalker@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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 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.