From: Ingo Molnar <mingo@elte.hu>
To: Dave Olson <olson@unixfolk.com>
Cc: Andrew Morton <akpm@osdl.org>,
ccb@acm.org, linux-kernel@vger.kernel.org,
nickpiggin@yahoo.com.au
Subject: Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
Date: Fri, 23 Jun 2006 09:57:13 +0200 [thread overview]
Message-ID: <20060623075713.GA31178@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.61.0606212243240.32136@osa.unixfolk.com>
* Dave Olson <olson@unixfolk.com> wrote:
> | > CONFIG_DEBUG_SPINLOCK=y
> | > CONFIG_DEBUG_SPINLOCK_SLEEP=y
> | It would be super-interesting to know whether
> | CONFIG_DEBUG_SPINLOCK=n improves things.
>
> It does. No stalls, hangs, or nmi's in several hours of running the
> test that previously failed on almost every run (with long stalls,
> system hangs, or NMI watchdogs), on the same hardware.
>
> I made no other changes to the kernel config than turning both of the
> above off.
we really need to figure out what's happening here! Could you re-enable
spinlock debugging and try the patch below - do the stalls/lockups still
happen?
Ingo
---
lib/spinlock_debug.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Index: linux/lib/spinlock_debug.c
===================================================================
--- linux.orig/lib/spinlock_debug.c
+++ linux/lib/spinlock_debug.c
@@ -104,10 +104,10 @@ static void __spin_lock_debug(spinlock_t
u64 i;
for (;;) {
- for (i = 0; i < loops_per_jiffy * HZ; i++) {
+ for (;;) {
if (__raw_spin_trylock(&lock->raw_lock))
return;
- __delay(1);
+ cpu_relax();
}
/* lockup suspected: */
if (print_once) {
@@ -169,10 +169,10 @@ static void __read_lock_debug(rwlock_t *
u64 i;
for (;;) {
- for (i = 0; i < loops_per_jiffy * HZ; i++) {
+ for (;;) {
if (__raw_read_trylock(&lock->raw_lock))
return;
- __delay(1);
+ cpu_relax();
}
/* lockup suspected: */
if (print_once) {
@@ -242,10 +242,10 @@ static void __write_lock_debug(rwlock_t
u64 i;
for (;;) {
- for (i = 0; i < loops_per_jiffy * HZ; i++) {
+ for (;;) {
if (__raw_write_trylock(&lock->raw_lock))
return;
- __delay(1);
+ cpu_relax();
}
/* lockup suspected: */
if (print_once) {
next prev parent reply other threads:[~2006-06-23 8:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-22 5:45 [patch] increase spinlock-debug looping timeouts (write_lock and NMI) Dave Olson
2006-06-22 5:57 ` Andrew Morton
2006-06-23 7:57 ` Ingo Molnar [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-06-23 16:27 Dave Olson
[not found] <fa.VT2rwoX1M/2O/aO5crhlRDNx4YA@ifi.uio.no>
[not found] ` <fa.Zp589GPrIISmAAheRowfRgZ1jgs@ifi.uio.no>
2006-06-20 5:35 ` Dave Olson
2006-06-20 6:39 ` Andrew Morton
2006-06-20 6:53 ` Dave Jones
2006-06-20 7:37 ` Nick Piggin
2006-06-20 8:03 ` Andrew Morton
2006-06-20 8:33 ` Ingo Molnar
2006-06-20 9:37 ` Nick Piggin
2006-06-20 9:51 ` Ingo Molnar
2006-06-20 10:59 ` Nick Piggin
2006-06-20 13:04 ` Arjan van de Ven
2006-06-20 13:36 ` Nick Piggin
2006-06-20 14:53 ` Arjan van de Ven
2006-06-20 15:16 ` Nick Piggin
2006-06-20 16:27 ` Nick Piggin
2006-06-20 8:43 ` Arjan van de Ven
2006-06-20 16:11 ` Dave Olson
2006-06-20 21:10 ` Andrew Morton
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=20060623075713.GA31178@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=ccb@acm.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=olson@unixfolk.com \
/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.