Messages in this thread Patch in this message |  | | Date | Sat, 11 Nov 2000 11:25:00 +1100 | From | Andrew Morton <> | Subject | Re: 2.4.0-test11pre2-ac1 and previous problem |
| |
"Pawe³ Kot" wrote: > > Hello, > > I've following error with 2.4.0-test{9|10|pre11pre1-ac1|pre11pre2-ac1}: > > NMI Watchdog detected LOCKUP on CPU3, registers: > > And then the machine hangs. No response at all. > Always CPU3 is mentioned. > The machine is: > The latest Intel motherboard for 4xCPU (ISP4040) > 4xPentium III 700 (Xeon) > 4GB RAM > mylex raid array (the newest controller) > eepro100 ethernet card > > This machine is running only MySQL database. > > What can be wrong?
Oh no. Another one. Could you please try this attached patch (against test11-pre2) and see if the diagnostics come out?--- linux-2.4.0-test11-pre2/arch/i386/kernel/traps.c Fri Nov 10 20:24:02 2000 +++ linux-akpm/arch/i386/kernel/traps.c Sat Nov 11 02:35:25 2000 @@ -382,20 +382,10 @@ printk("Do you have a strange power saving mode enabled?\n"); } -#if CONFIG_X86_IO_APIC - -int nmi_watchdog = 1; - -static int __init setup_nmi_watchdog(char *str) -{ - get_option(&str, &nmi_watchdog); - return 1; -} - -__setup("nmi_watchdog=", setup_nmi_watchdog); - -extern spinlock_t console_lock, timerlist_lock; +extern spinlock_t console_lock, timerlist_lock, runqueue_lock; static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED; +extern wait_queue_head_t log_wait; +static int ignore_spinlocks = -1; /* * Unlock any spinlocks which will prevent us from getting the @@ -404,9 +394,30 @@ */ void bust_spinlocks(void) { + ignore_spinlocks = smp_processor_id(); + global_irq_lock = 0; spin_lock_init(&console_lock); spin_lock_init(&timerlist_lock); + spin_lock_init(&runqueue_lock); + log_wait.lock = WAITQUEUE_RW_LOCK_UNLOCKED; } + +int no_spinlocks() +{ + return smp_processor_id() == ignore_spinlocks; +} + +#if CONFIG_X86_IO_APIC + +int nmi_watchdog = 1; + +static int __init setup_nmi_watchdog(char *str) +{ + get_option(&str, &nmi_watchdog); + return 1; +} + +__setup("nmi_watchdog=", setup_nmi_watchdog); inline void nmi_watchdog_tick(struct pt_regs * regs) { --- linux-2.4.0-test11-pre2/include/asm-i386/spinlock.h Sun Oct 15 01:27:46 2000 +++ linux-akpm/include/asm-i386/spinlock.h Sat Nov 11 02:17:46 2000 @@ -8,6 +8,8 @@ extern int printk(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); +extern int no_spinlocks(void); + /* It seems that people are forgetting to * initialize their spinlocks properly, tsk tsk. * Remember to turn this off in 2.4. -ben @@ -68,6 +70,8 @@ static inline int spin_trylock(spinlock_t *lock) { char oldval; + if (no_spinlocks()) + return 0; __asm__ __volatile__( "xchgb %b0,%1" :"=q" (oldval), "=m" (lock->lock) @@ -85,6 +89,8 @@ BUG(); } #endif + if (no_spinlocks()) + return; __asm__ __volatile__( spin_lock_string :"=m" (lock->lock) : : "memory"); @@ -149,6 +155,9 @@ if (rw->magic != RWLOCK_MAGIC) BUG(); #endif + if (no_spinlocks()) + return; + __build_read_lock(rw, "__read_lock_failed"); } @@ -158,6 +167,8 @@ if (rw->magic != RWLOCK_MAGIC) BUG(); #endif + if (no_spinlocks()) + return; __build_write_lock(rw, "__write_lock_failed"); } --- linux-2.4.0-test11-pre2/arch/i386/kernel/i386_ksyms.c Fri Aug 11 19:06:11 2000 +++ linux-akpm/arch/i386/kernel/i386_ksyms.c Sat Nov 11 02:24:32 2000 @@ -155,3 +155,6 @@ #ifdef CONFIG_X86_PAE EXPORT_SYMBOL(empty_zero_page); #endif + +EXPORT_SYMBOL(no_spinlocks); + |  |