Re: [patch] increase spinlock-debug looping timeouts (write_lockand NMI)

From: Dave Olson
Date: Fri Jun 23 2006 - 12:25:46 EST


On Fri, 23 Jun 2006, Ingo Molnar wrote:
| 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?

I'll do that, but the 2.6.16 FC4 kernel already has cpu_relax()
rather than __delay(1), so I'm about 95% certain that this patch
isn't going to help anything. The NMI watchdog will still fire,
because all we are going to do is wait even longer, etc.

| ===================================================================
| --- 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();
| }

etc.

Dave Olson
olson@xxxxxxxxxxxx
http://www.unixfolk.com/dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/