From: Hugh Dickins <hugh@veritas.com>
To: David Miller <davem@davemloft.net>
Cc: mingo@elte.hu, peterz@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: combinatorial explosion in lockdep
Date: Mon, 4 Aug 2008 13:21:50 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0808041309390.21768@blonde.site> (raw)
In-Reply-To: <20080803.011440.137037332.davem@davemloft.net>
On Sun, 3 Aug 2008, David Miller wrote:
>
> It's probably best to not later clear oops_in_progress when we trigger
> an event like this, to ensure that we do actually get any followon
> messages on the console.
Ah, so it was intentional that your patch set oops_in_progess without
ever clearing it again. Hmm. I think I'd reword your "probably best"
to "arguably best". If everything really locks up at this point, then
there is no point to clearing oops_in_progress after; but if the system
manages to resume (arguably) normal operation after, then leaving it
forever oops_in_progess worries me, and differs from current practice.
I think I'd rather clear it afterwards in any public patch; but edit
that out privately if it helps while debugging some particular problem.
I did try to reproduce my spinlock lockups yesterday, but without
success, so have no practical experience one way or the other.
But notice that I shouldn't be messing directly with oops_in_progress:
better to use bust_spinlocks() (oops_in_progress++/-- and wake klogd).
[PATCH] bust_spinlocks while reporting spinlock lockup
Use bust_spinlocks() while reporting spinlock lockup to avoid deadlock
inside printk() or the backtraces.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
lib/spinlock_debug.c | 2 ++
1 file changed, 2 insertions(+)
--- 2.6.27-rc1/lib/spinlock_debug.c 2008-01-24 22:58:37.000000000 +0000
+++ linux/lib/spinlock_debug.c 2008-08-01 12:41:52.000000000 +0100
@@ -113,6 +113,7 @@ static void __spin_lock_debug(spinlock_t
/* lockup suspected: */
if (print_once) {
print_once = 0;
+ bust_spinlocks(1);
printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, "
"%s/%d, %p\n",
raw_smp_processor_id(), current->comm,
@@ -121,6 +122,7 @@ static void __spin_lock_debug(spinlock_t
#ifdef CONFIG_SMP
trigger_all_cpu_backtrace();
#endif
+ bust_spinlocks(0);
}
}
}
prev parent reply other threads:[~2008-08-04 12:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 22:37 David Miller
2008-07-28 22:50 ` Jeremy Fitzhardinge
2008-07-28 22:56 ` David Miller
2008-07-28 23:13 ` David Miller
2008-07-28 23:51 ` Ingo Molnar
2008-07-29 0:44 ` David Miller
2008-07-30 4:45 ` David Miller
2008-07-30 6:56 ` David Miller
2008-07-30 7:21 ` Peter Zijlstra
2008-07-30 7:19 ` Peter Zijlstra
2008-07-30 11:15 ` Peter Zijlstra
2008-07-31 16:50 ` [stable] " Greg KH
2008-07-30 11:26 ` [PATCH] lockdep: change scheduler annotation Peter Zijlstra
2008-07-30 11:34 ` David Miller
2008-07-31 16:34 ` Ingo Molnar
2008-07-31 16:39 ` combinatorial explosion in lockdep Ingo Molnar
2008-08-01 9:22 ` Ingo Molnar
2008-08-01 9:32 ` David Miller
2008-08-01 11:57 ` Hugh Dickins
2008-08-03 8:14 ` David Miller
2008-08-04 12:21 ` Hugh Dickins [this message]
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=Pine.LNX.4.64.0808041309390.21768@blonde.site \
--to=hugh@veritas.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®