Kernel simply enters cpu_idle() if more than 3 cpus are used inkvm

From: Christoph Lameter
Date: Mon Mar 28 2011 - 13:34:55 EST


Current kernel by Linus.

kvm is started using

kvm ~/kvm/qmdr -kernel arch/x86/boot/bzImage -append "root=/dev/hda1
earlyprintk=ttyS0,115200 console=ttyS0,115200 numa=fake=4 $2" --nographic
-m 2048 -smp 3

The above boots fine. However, when I replace -smp 3 with -smp 4 then the
kernel
hangs on boot with all processors in idle state:

(gdb) target remote tcp::1234
Remote debugging using tcp::1234
0xffffffff8102f1c6 in native_safe_halt () at
/home/christoph/n/linux-2.6/arch/x86/include/asm/irqflags.h:49
49 asm volatile("sti; hlt": : :"memory");
(gdb) thread apply all bt
[New Thread 2]
[New Thread 3]
[New Thread 4]

Thread 4 (Thread 4):
#0 0xffffffff8102f1c6 in native_safe_halt () at /home/christoph/n/linux-2.6/arch/x86/include/asm/irqflags.h:49
#1 arch_safe_halt () at /home/christoph/n/linux-2.6/arch/x86/include/asm/irqflags.h:90
#2 default_idle () at arch/x86/kernel/process.c:388
#3 0xffffffff810288a6 in cpu_idle () at arch/x86/kernel/process_64.c:139
#4 0xffffffff81cc19ee in start_secondary (unused=<value optimized out>)
at arch/x86/kernel/smpboot.c:297
#5 0x0000000000000000 in ?? ()

Thread 3 (Thread 3):
#0 0xffffffff8102f1c6 in native_safe_halt () at /home/christoph/n/linux-2.6/arch/x86/include/asm/irqflags.h:49
#1 arch_safe_halt () at /home/christoph/n/linux-2.6/arch/x86/include/asm/irqflags.h:90
#2 default_idle () at arch/x86/kernel/process.c:388
#3 0xffffffff810288a6 in cpu_idle () at arch/x86/kernel/process_64.c:139
#4 0xffffffff81cc19ee in start_secondary (unused=<value optimized out>) at arch/x86/kernel/smpboot.c:297
#5 0x0000000000000000 in ?? ()

Thread 2 (Thread 2):
#0 0xffffffff8102f1c6 in native_safe_halt () at /home/christoph/n/linux-2.6/arch/x86/include/asm/irqflags.h:49
#1 arch_safe_halt () at /home/christoph/n/linux-2.6/arch/x86/include/asm/irqflags.h:90
#2 default_idle () at arch/x86/kernel/process.c:388
#3 0xffffffff810288a6 in cpu_idle () at arch/x86/kernel/process_64.c:139
#4 0xffffffff81cc19ee in start_secondary (unused=<value optimized out>)
at arch/x86/kernel/smpboot.c:297
#5 0x0000000000000000 in ?? ()

Thread 1 (Thread 1):
#0 0xffffffff8102f1c6 in native_safe_halt () at /home/christoph/n/linux-2.6/arch/x86/include/asm/irqflags.h:49
#1 arch_safe_halt () at /home/christoph/n/linux-2.6/arch/x86/include/asm/irqflags.h:90
#2 default_idle () at arch/x86/kernel/process.c:388
#3 0xffffffff810288a6 in cpu_idle () at arch/x86/kernel/process_64.c:139
#4 0xffffffff814d39be in rest_init () at init/main.c:375
#5 0xffffffff81c8cb99 in start_kernel () at init/main.c:625
#6 0xffffffff81c8c2a8 in x86_64_start_reservations (real_mode_data=<value optimized out>) at arch/x86/kernel/head64.c:124
#7 0xffffffff81c8c399 in x86_64_start_kernel (real_mode_data=0x13740 <Address 0x13740 out of bounds>) at arch/x86/kernel/head64.c:94
#8 0x0000000000000000 in ?? ()
(gdb)

--
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/