SMP Problem
Hello,
Attached is the output of 'dmesg' that specified the above eMail address. Attached is output of /proc/cpuinfo
Attached is output of /proc/interrupts
My problem:
I have a supermicro P4DPE motherboard with (2) Xeon 2.0GHZ Dual CPUs (total of 4 CPUs).
I have my own threading benchmark progam that runs as fast as possible.
When I boot with Linux7.3 SMP kernel:
1) ~4million transactions in 60 seconds
2) ~170thousand context switches a second
3) user cpu=~20% sys cpu=~20% idle=~60%
very slow
When I boot with Linux7.3 without SMP kernel (effectively 1 cpu)
1) ~9million transactions in 60 seconds
2) ~33thousand context switches a second
3) user cpu=~100% sys cpu=0% idle=0%
very fast
Any answers??
Cheers,
Mike Andrescavage
ources: 21.
number of IO-APIC #2 registers: 24.
number of IO-APIC #3 registers: 24.
number of IO-APIC #4 registers: 24.
number of IO-APIC #5 registers: 24.
number of IO-APIC #8 registers: 24.
testing the IO APIC.......................
IO APIC #2......
.... register #00: 02008000
....... : physical APIC id: 02
WARNING: unexpected IO-APIC, please mail
to [email protected]
.... register #01: 00178020
....... : max redirection entries: 0017 ....... : PRQ implemented: 1 ....... : IO APIC version: 0020
.... register #02: 00000000
....... : arbitration: 00
.... IRQ redirection table:
NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
00 000 00 1 0 0 0 0 0 0 00 01 00F 0F 0 0 0 0 0 1 1 39 02 00F 0F 0 0 0 0 0 1 1 31 03 00F 0F 0 0 0 0 0 1 1 41 04 00F 0F 0 0 0 0 0 1 1 49 05 00F 0F 0 0 0 0 0 1 1 51 06 00F 0F 0 0 0 0 0 1 1 59 07 00F 0F 0 0 0 0 0 1 1 61 08 00F 0F 0 0 0 0 0 1 1 69 09 00F 0F 0 0 0 0 0 1 1 71 0a 000 00 1 0 0 0 0 0 0 00 0b 000 00 1 0 0 0 0 0 0 00 0c 00F 0F 0 0 0 0 0 1 1 79 0d 00F 0F 0 0 0 0 0 1 1 81 0e 00F 0F 0 0 0 0 0 1 1 89 0f 00F 0F 0 0 0 0 0 1 1 91 10 00F 0F 1 1 0 1 0 1 1 99 11 00F 0F 1 1 0 1 0 1 1 A1 12 00F 0F 1 1 0 1 0 1 1 A9 13 00F 0F 1 1 0 1 0 1 1 B1 14 000 00 1 0 0 0 0 0 0 00 15 000 00 1 0 0 0 0 0 0 00 16 000 00 1 0 0 0 0 0 0 00 17 000 00 1 0 0 0 0 0 0 00
IO APIC #3......
.... register #00: 03000000
....... : physical APIC id: 03
.... register #01: 00178020
....... : max redirection entries: 0017 ....... : PRQ implemented: 1 ....... : IO APIC version: 0020
.... register #02: 03000000
....... : arbitration: 03
.... IRQ redirection table:
NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
00 000 00 1 0 0 0 0 0 0 00 01 000 00 1 0 0 0 0 0 0 00 02 000 00 1 0 0 0 0 0 0 00 03 000 00 1 0 0 0 0 0 0 00 04 000 00 1 0 0 0 0 0 0 00 05 000 00 1 0 0 0 0 0 0 00 06 000 00 1 0 0 0 0 0 0 00 07 000 00 1 0 0 0 0 0 0 00 08 000 00 1 0 0 0 0 0 0 00 09 000 00 1 0 0 0 0 0 0 00 0a 000 00 1 0 0 0 0 0 0 00 0b 000 00 1 0 0 0 0 0 0 00 0c 000 00 1 0 0 0 0 0 0 00 0d 000 00 1 0 0 0 0 0 0 00 0e 000 00 1 0 0 0 0 0 0 00 0f 000 00 1 0 0 0 0 0 0 00 10 000 00 1 0 0 0 0 0 0 00 11 000 00 1 0 0 0 0 0 0 00 12 000 00 1 0 0 0 0 0 0 00 13 000 00 1 0 0 0 0 0 0 00 14 000 00 1 0 0 0 0 0 0 00 15 000 00 1 0 0 0 0 0 0 00 16 000 00 1 0 0 0 0 0 0 00 17 000 00 1 0 0 0 0 0 0 00
IO APIC #4......
.... register #00: 04000000
....... : physical APIC id: 04
.... register #01: 00178020
....... : max redirection entries: 0017 ....... : PRQ implemented: 1 ....... : IO APIC version: 0020
.... register #02: 04000000
....... : arbitration: 04
.... IRQ redirection table:
NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
00 000 00 1 0 0 0 0 0 0 00 01 000 00 1 0 0 0 0 0 0 00 02 000 00 1 0 0 0 0 0 0 00 03 000 00 1 0 0 0 0 0 0 00 04 000 00 1 0 0 0 0 0 0 00 05 000 00 1 0 0 0 0 0 0 00 06 000 00 1 0 0 0 0 0 0 00 07 000 00 1 0 0 0 0 0 0 00 08 000 00 1 0 0 0 0 0 0 00 09 000 00 1 0 0 0 0 0 0 00 0a 000 00 1 0 0 0 0 0 0 00 0b 000 00 1 0 0 0 0 0 0 00 0c 000 00 1 0 0 0 0 0 0 00 0d 000 00 1 0 0 0 0 0 0 00 0e 000 00 1 0 0 0 0 0 0 00 0f 000 00 1 0 0 0 0 0 0 00 10 000 00 1 0 0 0 0 0 0 00 11 000 00 1 0 0 0 0 0 0 00 12 000 00 1 0 0 0 0 0 0 00 13 000 00 1 0 0 0 0 0 0 00 14 000 00 1 0 0 0 0 0 0 00 15 000 00 1 0 0 0 0 0 0 00 16 000 00 1 0 0 0 0 0 0 00 17 000 00 1 0 0 0 0 0 0 00
IO APIC #5......
.... register #00: 05000000
....... : physical APIC id: 05
.... register #01: 00178020
....... : max redirection entries: 0017 ....... : PRQ implemented: 1 ....... : IO APIC version: 0020
.... register #02: 05000000
....... : arbitration: 05
.... IRQ redirection table:
NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
00 000 00 1 0 0 0 0 0 0 00 01 000 00 1 0 0 0 0 0 0 00 02 000 00 1 0 0 0 0 0 0 00 03 000 00 1 0 0 0 0 0 0 00 04 000 00 1 0 0 0 0 0 0 00 05 000 00 1 0 0 0 0 0 0 00 06 000 00 1 0 0 0 0 0 0 00 07 000 00 1 0 0 0 0 0 0 00 08 000 00 1 0 0 0 0 0 0 00 09 000 00 1 0 0 0 0 0 0 00 0a 000 00 1 0 0 0 0 0 0 00 0b 000 00 1 0 0 0 0 0 0 00 0c 000 00 1 0 0 0 0 0 0 00 0d 000 00 1 0 0 0 0 0 0 00 0e 000 00 1 0 0 0 0 0 0 00 0f 000 00 1 0 0 0 0 0 0 00 10 000 00 1 0 0 0 0 0 0 00 11 000 00 1 0 0 0 0 0 0 00 12 000 00 1 0 0 0 0 0 0 00 13 000 00 1 0 0 0 0 0 0 00 14 000 00 1 0 0 0 0 0 0 00 15 000 00 1 0 0 0 0 0 0 00 16 000 00 1 0 0 0 0 0 0 00 17 000 00 1 0 0 0 0 0 0 00
IO APIC #8......
.... register #00: 08000000
....... : physical APIC id: 08
.... register #01: 00178020
....... : max redirection entries: 0017 ....... : PRQ implemented: 1 ....... : IO APIC version: 0020
.... register #02: 08000000
....... : arbitration: 08
.... IRQ redirection table:
NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:
00 00F 0F 1 1 0 1 0 1 1 B9 01 000 00 1 0 0 0 0 0 0 00 02 000 00 1 0 0 0 0 0 0 00 03 000 00 1 0 0 0 0 0 0 00 04 000 00 1 0 0 0 0 0 0 00 05 000 00 1 0 0 0 0 0 0 00 06 000 00 1 0 0 0 0 0 0 00 07 000 00 1 0 0 0 0 0 0 00 08 000 00 1 0 0 0 0 0 0 00 09 000 00 1 0 0 0 0 0 0 00 0a 000 00 1 0 0 0 0 0 0 00 0b 000 00 1 0 0 0 0 0 0 00 0c 000 00 1 0 0 0 0 0 0 00 0d 000 00 1 0 0 0 0 0 0 00 0e 000 00 1 0 0 0 0 0 0 00 0f 000 00 1 0 0 0 0 0 0 00 10 000 00 1 0 0 0 0 0 0 00 11 000 00 1 0 0 0 0 0 0 00 12 000 00 1 0 0 0 0 0 0 00 13 000 00 1 0 0 0 0 0 0 00 14 000 00 1 0 0 0 0 0 0 00 15 000 00 1 0 0 0 0 0 0 00 16 000 00 1 0 0 0 0 0 0 00 17 000 00 1 0 0 0 0 0 0 00
IRQ to pin mappings:
IRQ0 -> 0:2
IRQ1 -> 0:1
IRQ3 -> 0:3
IRQ4 -> 0:4
IRQ5 -> 0:5
IRQ6 -> 0:6
IRQ7 -> 0:7
IRQ8 -> 0:8
IRQ9 -> 0:9
IRQ12 -> 0:12
IRQ13 -> 0:13
IRQ14 -> 0:14
IRQ15 -> 0:15
IRQ16 -> 0:16
IRQ17 -> 0:17
IRQ18 -> 0:18
IRQ19 -> 0:19
IRQ96 -> 4:0
.................................... done.
Using local APIC timer interrupts.
calibrating APIC timer ...
..... CPU clock speed is 1996.5921 MHz.
..... host bus clock speed is 99.8294 MHz.
cpu: 0, clocks: 998294, slice: 199658
CPU0<T0:998288,T1:798624,D:6,S:199658,C:998294>
cpu: 1, clocks: 998294, slice: 199658
cpu: 3, clocks: 998294, slice: 199658
cpu: 2, clocks: 998294, slice: 199658
CPU1<T0:998288,T1:598960,D:12,S:199658,C:998294> CPU2<T0:998288,T1:399312,D:2,S:199658,C:998294> CPU3<T0:998288,T1:199648,D:8,S:199658,C:998294>
checking TSC synchronization across CPUs: passed.
mtrr: your CPUs had inconsistent fixed MTRR settings
mtrr: probably your BIOS does not setup all CPUs
PCI: PCI BIOS revision 2.10 entry at 0xfd875, last bus=7
PCI: Using configuration type 1
PCI: Probing PCI hardware
Unknown bridge resource 0: assuming transparent
Unknown bridge resource 2: assuming transparent
Unknown bridge resource 0: assuming transparent
Unknown bridge resource 1: assuming transparent
Unknown bridge resource 2: assuming transparent
Unknown bridge resource 0: assuming transparent
Unknown bridge resource 1: assuming transparent
Unknown bridge resource 2: assuming transparent
Unknown bridge resource 2: assuming transparent
Unknown bridge resource 1: assuming transparent
Unknown bridge resource 2: assuming transparent
Unknown bridge resource 0: assuming transparent
Unknown bridge resource 1: assuming transparent
Unknown bridge resource 2: assuming transparent
Unknown bridge resource 2: assuming transparent
PCI: Discovered primary peer bus 10 [IRQ]
PCI: Discovered primary peer bus 11 [IRQ]
PCI: Discovered primary peer bus 12 [IRQ]
PCI: Using IRQ router PIIX [8086/2480] at 00:1f.0PCI->APIC IRQ transform: (B0,I29,P0) -> 16PCI->APIC IRQ transform: (B0,I29,P1) -> 19PCI->APIC IRQ transform: (B0,I29,P2) -> 18PCI->APIC IRQ transform: (B5,I1,P0) -> 96PCI->APIC IRQ transform: (B7,I1,P0) -> 16PCI->APIC IRQ transform: (B7,I2,P0) -> 17PCI->APIC IRQ transform: (B7,I3,P0) -> 18
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16)
apm: disabled - APM is not SMP safe.
Starting kswapd
VFS: Diskquotas version dquot_6.5.0 initialized
pty: 2048 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ SERIAL_PCI ISAPNP enabled ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
Real Time Clock Driver v1.10e
block: 992 slots per queue, batch=248
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev f9
PCI: Device 00:1f.1 not available because of resource collisions
PIIX4: (ide_setup_pci_device:) Could not enable device.
hda: WDC WD400BB-00CJA1, ATA DISK drive
hdb: WDC WD400BB-00CJA1, ATA DISK drive
hdc: FX54++W, ATAPI CD/DVD-ROM drive
hdd: LITE-ON LTR-40125S, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63
hdb: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63
ide-floppy driver 0.99.newide
Partition check:
hda: hda1 hda2 hda3
hdb: hdb1
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
ide-floppy driver 0.99.newide
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.pci_hotplug: PCI Hot Plug PCI Core version: 0.4
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 4096 buckets, 32Kbytes
TCP: Hash tables configured (established 32768 bind 32768)
Linux IP multicast router 0.06 plus PIM-SM
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 123k freed
VFS: Mounted root (ext2 filesystem).
Journalled Block Device driver loaded
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Freeing unused kernel memory: 304k freed
Adding Swap: 1044216k swap-space (priority -1)usb.c: registered new driver usbdevfsusb.c: registered new driver hubusb-uhci.c: $Revision: 1.275 $ time 07:22:46 Apr 18 2002usb-uhci.c: High bandwidth mode enabled
PCI: Setting latency timer of device 00:1d.0 to 64usb-uhci.c: USB UHCI at I/O 0x2000, IRQ 16usb-uhci.c: Detected 2 portsusb.c: new USB bus registered, assigned bus number 1hub.c: USB hub foundhub.c: 2 ports detected
PCI: Setting latency timer of device 00:1d.1 to 64usb-uhci.c: USB UHCI at I/O 0x2020, IRQ 19usb-uhci.c: Detected 2 portsusb.c: new USB bus registered, assigned bus number 2hub.c: USB hub foundhub.c: 2 ports detected
PCI: Setting latency timer of device 00:1d.2 to 64usb-uhci.c: USB UHCI at I/O 0x2040, IRQ 18usb-uhci.c: Detected 2 portsusb.c: new USB bus registered, assigned bus number 3hub.c: USB hub foundhub.c: 2 ports detectedusb-uhci.c: v1.275:USB Universal Host Controller Interface driver
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,2), internal journal
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,65), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
hdc: ATAPI 54X CD-ROM drive, 128kB Cache
Uniform CD-ROM driver Revision: 3.12
SCSI subsystem driver Revision: 1.00
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
Vendor: LITE-ON Model: LTR-40125S Rev: ZS0J
Type: CD-ROM ANSI SCSI revision: 02
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP]
parport0: irq 7 detected
eepro100.c:v1.09j-t 9/29/99 Donald Becker http://www.scyld.com/network/eepro100.htmleepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <[email protected]> and others
eth0: OEM i82557/i82558 10/100 Ethernet, 00:30:48:23:A9:29, IRQ 17.
Board assembly 000000-000, Physical connectors present: RJ45
Primary interface chip i82555 PHY #1.
General self-test: passed.
Serial sub-system self-test: passed.
Internal registers self-test: passed.
ROM checksum self-test: passed (0xb874c1d3).
eth1: OEM i82557/i82558 10/100 Ethernet, 00:30:48:23:A9:2A, IRQ 18.
Board assembly 000000-000, Physical connectors present: RJ45
Primary interface chip i82555 PHY #1.
General self-test: passed.
Serial sub-system self-test: passed.
Internal registers self-test: passed.
ROM checksum self-test: passed (0xb874c1d3).
Creative EMU10K1 PCI Audio Driver, version 0.18, 07:22:52 Apr 18 2002
emu10k1: EMU10K1 rev 7 model 0x8064 found, IO at 0x3000-0x301f, IRQ 96ac97_codec: AC97 Audio codec, id: 0x454d:0x4328 (Unknown)
emu10k1: SBLive! 5.1 card detected
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
sr0: scsi3-mmc drive: 41x/48x writer cd/rw xa/form2 cdda tray
processor : 0vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) XEON(TM) CPU 2.00GHz
stepping : 4
cpu MHz : 1996.640
cache size : 512 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 3984.58
processor : 1vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) XEON(TM) CPU 2.00GHz
stepping : 4
cpu MHz : 1996.640
cache size : 512 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 3984.58
processor : 2vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) XEON(TM) CPU 2.00GHz
stepping : 4
cpu MHz : 1996.640
cache size : 512 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 3984.58
processor : 3vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) XEON(TM) CPU 2.00GHz
stepping : 4
cpu MHz : 1996.640
cache size : 512 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 3984.58
CPU0 CPU1 CPU2 CPU3
0: 204603 0 0 0 IO-APIC-edge timer 1: 3903 0 0 0 IO-APIC-edge keyboard 2: 0 0 0 0 XT-PIC cascade 4: 2416 0 0 0 IO-APIC-edge serial 8: 1 0 0 0 IO-APIC-edge rtc 12: 26771 0 0 0 IO-APIC-edge PS/2 Mouse 14: 23460 0 0 0 IO-APIC-edge ide0 15: 30514 0 0 0 IO-APIC-edge ide1 16: 0 0 0 0 IO-APIC-level usb-uhci 17: 9 0 0 0 IO-APIC-level eth0 18: 0 0 0 0 IO-APIC-level usb-uhci 19: 0 0 0 0 IO-APIC-level usb-uhci 96: 18147 0 0 0 IO-APIC-level EMU10K1 NMI: 0 0 0 0 LOC: 204483 204495 204495 204493 ERR: 0 MIS: 0
Quoted 7 lines · Michael Andrescavage
When I boot with Linux7.3 SMP kernel:
1) ~4million transactions in 60 seconds
2) ~170thousand context switches a second
3) user cpu=~20% sys cpu=~20% idle=~60%very slow
Several things could cause that. Firstly your context switch rate indicates you have serious problems in the design somewhere (or we have serious scheduler balancing problems).
What does the benchmark actually do ?