From: Helge Deller <deller@gmx.de>
To: linux-parisc@vger.kernel.org,
John David Anglin <dave@hiauly1.hia.nrc.ca>
Subject: [PATCH, RFC] fix parisc runtime hangs wrt pa_tlb_lock
Date: Fri, 22 May 2009 22:13:01 +0200 [thread overview]
Message-ID: <4A17074D.30602@gmx.de> (raw)
Since many kernel versions I regularly faced reproducibly kernel hangs when
compiling some bigger files. The machine suddenly just seemed to hang.
With spinlock debugging turned on I found this:
BUG: spinlock recursion on CPU#0, tool/7263
lock: 10644000, .magic: dead4ead, .owner: tool/7263, .owner_cpu: 0
Backtrace:
[<10113a94>] show_stack+0x18/0x28
BUG: spinlock lockup on CPU#0, tool/7263, 10644000
Backtrace:
[<10113a94>] show_stack+0x18/0x28
BUG: soft lockup - CPU#0 stuck for 61s! [tool:7263]
IASQ: 00000000 00000000 IAOQ: 102d55dc 102d557c
IIR: 03c008b3 ISR: 00000000 IOR: 00000000
CPU: 0 CR30: 7d1a4000 CR31: 11111111
ORIG_R28: 00000000
IAOQ[0]: _raw_spin_lock+0x15c/0x1c0
IAOQ[1]: _raw_spin_lock+0xfc/0x1c0
RP(r2): _raw_spin_lock+0x18c/0x1c0
Backtrace:
[<102d560c>] _raw_spin_lock+0x18c/0x1c0
Kernel panic - not syncing: softlockup: hung tasks
Backtrace:
[<10113a94>] show_stack+0x18/0x28
The lock at "10644000" references pa_tlb_lock, which is used to lock the PxTLB
broadcasts (see comment in cache.c).
So, I think we need to use the irq-blocking functions for purge_tlb_start() and
purge_tlb_end(). I did tested the patch below, and since then I didn't faced one
single hang any longer.
The patch below is just a hack. It will need a cleanup and is just to open
discussions here on the list.
Helge
diff --git a/arch/parisc/include/asm/tlbflush.h b/arch/parisc/include/asm/tlbflush.h
index 1f6fd4f..9b92fbe 100644
--- a/arch/parisc/include/asm/tlbflush.h
+++ b/arch/parisc/include/asm/tlbflush.h
@@ -18,8 +18,8 @@
*/
extern spinlock_t pa_tlb_lock;
-#define purge_tlb_start(x) spin_lock(&pa_tlb_lock)
-#define purge_tlb_end(x) spin_unlock(&pa_tlb_lock)
+#define purge_tlb_start(x) do { unsigned long flags; spin_lock_irqsave(&pa_tlb_lock, flags)
+#define purge_tlb_end(x) spin_unlock_irqrestore(&pa_tlb_lock, flags); } while (0)
extern void flush_tlb_all(void);
extern void flush_tlb_all_local(void *);
next reply other threads:[~2009-05-22 20:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 20:13 Helge Deller [this message]
2009-05-23 15:26 ` [PATCH, RFC] fix parisc runtime hangs wrt pa_tlb_lock John David Anglin
2009-05-23 15:34 ` John David Anglin
2009-05-23 19:34 ` Helge Deller
2009-05-23 20:03 ` John David Anglin
2009-05-23 21:53 ` John David Anglin
2009-05-28 1:50 ` John David Anglin
2009-06-06 21:25 ` Helge Deller
2009-06-14 22:05 ` Helge Deller
2009-06-14 23:20 ` John David Anglin
2009-06-16 20:51 ` [PATCH] " Helge Deller
2009-06-17 2:55 ` Kyle McMartin
2009-06-17 7:26 ` Helge Deller
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=4A17074D.30602@gmx.de \
--to=deller@gmx.de \
--cc=dave@hiauly1.hia.nrc.ca \
--cc=linux-parisc@vger.kernel.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