From: Andrew Morton <akpm@linux-foundation.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [BUG] lockup with the latest kernel
Date: Wed, 19 Aug 2009 09:18:20 -0700 [thread overview]
Message-ID: <20090819091820.d55e3353.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.00.0908191134260.12663@gandalf.stny.rr.com>
On Wed, 19 Aug 2009 11:49:25 -0400 (EDT) Steven Rostedt <rostedt@goodmis.org> wrote:
> Always happens where one CPU is sending an IPI and the other has the rq
> spinlock. Seems to be that the IPI expects the other CPU to not have
> interrupts disabled or something?
>
> Note, I've seen this on 2.6.30-rc6 as well (yes that's 2.6.30). But this
> does not happen on 2.6.29. Unfortunately, 2.6.29 makes my NIC go kaputt
> for some reason.
>
> I've enabled LOCKDEP and it just makes the bug trigger easier.
>
> Anyway, anyone have any ideas?
We'd need to see the backtrace on the target CPU.
It shouldn't be too hard - set that CPU's bit in
arch/x86/kernel/apic/nmi.c:backtrace_mask and then clear it again when
that CPU has responded.
Or even:
diff -puN arch/x86/kernel/apic/nmi.c~a arch/x86/kernel/apic/nmi.c
--- a/arch/x86/kernel/apic/nmi.c~a
+++ a/arch/x86/kernel/apic/nmi.c
@@ -387,6 +387,8 @@ void touch_nmi_watchdog(void)
}
EXPORT_SYMBOL(touch_nmi_watchdog);
+extern int wizzle;
+
notrace __kprobes int
nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
{
@@ -415,7 +417,8 @@ nmi_watchdog_tick(struct pt_regs *regs,
}
/* We can be called before check_nmi_watchdog, hence NULL check. */
- if (backtrace_mask != NULL && cpumask_test_cpu(cpu, backtrace_mask)) {
+ if (cpu == wizzle ||
+ (backtrace_mask != NULL && cpumask_test_cpu(cpu, backtrace_mask))) {
static DEFINE_SPINLOCK(lock); /* Serialise the printks */
spin_lock(&lock);
diff -puN arch/x86/kernel/smp.c~a arch/x86/kernel/smp.c
--- a/arch/x86/kernel/smp.c~a
+++ a/arch/x86/kernel/smp.c
@@ -111,13 +111,17 @@
* it goes straight through and wastes no time serializing
* anything. Worst case is that we lose a reschedule ...
*/
+int wizzle = -1;
+
static void native_smp_send_reschedule(int cpu)
{
if (unlikely(cpu_is_offline(cpu))) {
WARN_ON(1);
return;
}
+ wizzle = cpu;
apic->send_IPI_mask(cpumask_of(cpu), RESCHEDULE_VECTOR);
+ wizzle = -1;
}
void native_send_call_func_single_ipi(int cpu)
_
next prev parent reply other threads:[~2009-08-19 16:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-19 15:49 [BUG] lockup with the latest kernel Steven Rostedt
2009-08-19 15:50 ` Steven Rostedt
2009-08-19 16:18 ` Andrew Morton [this message]
2009-08-27 22:41 ` Steven Rostedt
2009-08-27 22:45 ` Steven Rostedt
2009-08-28 2:46 ` Tejun Heo
2009-08-28 2:52 ` Tejun Heo
2009-08-28 6:36 ` Ingo Molnar
2009-08-28 6:59 ` Tejun Heo
2009-08-28 4:05 ` Linus Torvalds
2009-08-28 16:15 ` Steven Rostedt
2009-08-28 18:33 ` Steven Rostedt
2009-09-09 2:29 ` Steven Rostedt
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=20090819091820.d55e3353.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox