From owner-freebsd-smp Mon Jan 13 01:15:13 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id BAA01091 for smp-outgoing; Mon, 13 Jan 1997 01:15:13 -0800 (PST) Received: from hemi.com (hemi.com [204.132.158.10]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id BAA01086 for ; Mon, 13 Jan 1997 01:15:08 -0800 (PST) Received: (from mbarkah@localhost) by hemi.com (8.8.4/8.7.3) id CAA22677 for freebsd-smp@freebsd.org; Mon, 13 Jan 1997 02:15:06 -0700 (MST) From: Ade Barkah Message-Id: <199701130915.CAA22677@hemi.com> Subject: Data point, and questions... To: freebsd-smp@freebsd.org Date: Mon, 13 Jan 1997 02:15:06 -0700 (MST) X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello, I tried running the smp kernel this weekend with various level of success. So far I'm pretty impressed. =-) Background: the motherboard is an Asus PCI/I-P54NP4D, with two Pentium 133s, and external cache disabled (broken). Supposedly I need a P54CM for the 2nd cpu, but the dealer installed an "off-the-shelf" P133, whatever that means. ** 1st try: compiled the kernel without the APIC_IO support as mptable suggests. After enabling the 2nd processor, most programs dump core with sig 11s. ** 2nd try: compiled a kernel with the APIC_IO support. Received the following message: | npx0: INT 16 interface | stray irq 13 | Enabled INTs: 1, 2, 3, 4, 6, 7, 8, 10, 11, 13, imen: 0x00ffd221 Hmm... reading npx.c says the FPU doesn't work in smp yet, so maybe the stray irq is ok. Now, sometimes (after a warm reboot, perhaps), the "13," doesn't show up, and the machine hangs. With this APIC_IO support, the machine appeared to be a little more stable, but after awhile it dies with random core dumps as well. ** 3rd try: I had an Adaptec 1542CF w/64mb + bounce buffer support. So, that might be part of the problem. I replaced it with an Adaptec 2940U, and compiled a new kernel with the Sys V shared mem support (for X) and the APIC_IO option. Things appear to be really stable so far. On reboot occasionally the machine hangs as the 2nd try above (right after Enabled INTs.) However, I've recompiled the kernel several times for testing and I've yet received a core dump. I've also compiled libc_r with no core dumps, so things really look promising. However... I can't tell if it's actually using two cpus! The "make -j 4" times using the smp w/apic and the uni-processor kernel yield almost identical times (about 14 minutes to compile an smp kernel, slow due to the disabled cache.) | % sysctl kern | grep smp | | kern.smp_active: 2 | kern.smp_cpus: 2 So, that looks normal... I don't know why I don't see any improve- ments at all. Is there another way to find out if processes are indeed running on two cpus ? I've appended my kernel configuration file below, in case it is interesting to anyone. ** Other notes: 1) On ps aux, all the STARTED times show "31Dec69". 2) The sio driver now regularly reports sio overflows. A modem is connected at 57.6k there. 3) Is there support for multi-threaded programs ? (I mean, do the threads run on multiple processors ?) I wrote a simple pthread program, and it doesn't look like the threads run in parallel. 4) Are there any other tests besides mptable you'd like me to run ? (mptable -verbose -dmesg output is appended below.) Thanks! Let me know if I can help in some way, even just to test something. Regards, -Ade ------------------------------------------------------------------- Inet: mbarkah@hemi.com - HEMISPHERE ONLINE - ------------------------------------------------------------------- 1) mptable -verbose -dmesg (mb: Asus PCI/I-P54NP4D) =============================================================================== MPTable, version 2.0.4 looking for EBDA pointer @ 0x040e, NOT found searching CMOS 'top of mem' @ 0x0009fc00 (639K) searching BIOS @ 0x000f0000 MP FPS found in BIOS @ physical addr: 0x000f98a0 ------------------------------------------------------------------------------- MP Floating Pointer Structure: location: BIOS physical address: 0x000f98a0 signature: '_MP_' length: 16 bytes version: 1.1 checksum: 0x48 mode: Virtual Wire ------------------------------------------------------------------------------- MP Config Table Header: physical address: 0x000f98b4 signature: 'PCMP' base table length: 228 version: 1.1 checksum: 0x5c OEM ID: 'ASUSTEK1' Product ID: 'P54NIP400000' OEM table pointer: 0x00000000 OEM table size: 0 entry count: 20 local APIC address: 0xfee00000 extended table length: 0 extended table checksum: 0 ------------------------------------------------------------------------------- MP Config Base Table Entries: -- Processors: APIC ID Version State Family Model Step Flags 0 0x11 BSP, usable 5 2 1 0x07bf 1 0x11 AP, usable 5 2 1 0x07bf -- Bus: Bus ID Type 0 ISA 1 PCI -- I/O APICs: APIC ID Version State Address 2 0x11 usable 0xfec00000 -- I/O Ints: Type Polarity Trigger Bus ID IRQ APIC ID INT# INT conforms conforms 0 1 2 1 INT conforms conforms 0 0 2 2 INT conforms conforms 0 3 2 3 INT conforms conforms 0 4 2 4 INT conforms conforms 0 5 2 5 INT conforms conforms 0 6 2 6 INT conforms conforms 0 7 2 7 INT conforms conforms 0 8 2 8 INT conforms conforms 0 9 2 9 INT conforms conforms 0 10 2 10 INT conforms conforms 0 11 2 11 INT conforms conforms 0 12 2 12 INT conforms conforms 0 13 2 13 INT conforms conforms 0 14 2 14 INT conforms conforms 0 15 2 15 -- Local Ints: Type Polarity Trigger Bus ID IRQ APIC ID INT# ------------------------------------------------------------------------------- dmesg output: Copyright (c) 1992-1996 FreeBSD Inc. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 3.0-SMP #0: Sun Jan 12 19:18:41 MST 1997 root@gw.barkah.org:/usr2/src/sys/compile/KERNEL FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 0, version: 0x00030010 cpu1 (AP): apic id: 1, version: 0x00030010 io0 (APIC): apic id: 2, version: 0x000f0011 Calibrating clock(s) relative to mc146818A clock ... i8254 clock: 1192906 Hz CPU: Pentium (586-class CPU) Origin = "GenuineIntel" Id = 0x52c Stepping=12 Features=0x3bf real memory = 67108864 (65536K bytes) avail memory = 62472192 (61008K bytes) Probing for devices on PCI bus 0: chip0 rev 17 on pci0:0 chip1 rev 136 on pci0:2 ahc0 rev 0 int a irq 15 on pci0:4 ahc0: aic7880 Single Channel, SCSI Id=7, 16 SCBs (ahc0:0:0): "SEAGATE ST11200N 8334" type 0 fixed SCSI 2 sd0(ahc0:0:0): Direct-Access 1005MB (2059140 512 byte sectors) (ahc0:1:0): "HP 2.13 GB #A1 9002" type 0 fixed SCSI 2 sd1(ahc0:1:0): Direct-Access 2033MB (4165272 512 byte sectors) (ahc0:4:0): "HP HP35480A 1133" type 1 removable SCSI 2 st0(ahc0:4:0): Sequential-Access density code 0x13, drive empty (ahc0:6:0): "TOSHIBA CD-ROM XM-3501TA 2564" type 5 removable SCSI 2 cd0(ahc0:6:0): CD-ROM can't get the size vga0 rev 1 on pci0:5 Probing for devices on the ISA bus: sc0 at 0x60-0x6f irq 1 on motherboard sc0: VGA color <16 virtual consoles, flags=0x0> sio0 at 0x3f8-0x3ff irq 4 on isa sio0: type 16550A sio1 at 0x2f8-0x2ff irq 3 on isa sio1: type 16550A lpt0 at 0x278-0x27f irq 7 on isa lpt0: Interrupt-driven port lp0: TCP/IP capable interface fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa fdc0: NEC 72065B fd0: 1.44MB 3.5in 1 3C5x9 board(s) on ISA found at 0x300 ep0 at 0x300-0x30f irq 10 on isa ep0: aui/utp/bnc[*UTP*] address 00:a0:24:a3:3f:b0 npx0 on motherboard npx0: INT 16 interface stray irq 13 Enabled INTs: 1, 2, 3, 4, 6, 7, 8, 10, 13, 15, imen: 0x00ff5a21 SMP: All idle procs online. SMP: Starting 1st AP! SMP: AP CPU #1 LAUNCHED!! Starting Scheduling... SMP: TADA! CPU #1 made it into the scheduler!. SMP: All 2 CPU's are online! sio1: 1 more silo overflow (total 1) ------------------------------------------------------------------------------- # SMP kernel config file options: options SMP # Symmetric MultiProcessor Kernel #options APIC_IO # Symmetric (APIC) I/O options NCPU=2 # number of CPUs options NBUS=2 # number of busses options NAPIC=1 # number of IO APICs options NINTR=15 # number of INTs =============================================================================== 2) Kernel configuration: # smp kernel for gw.barkah.org machine "i386" cpu "I586_CPU" cpu "I686_CPU" ident KERNEL maxusers 64 options MATH_EMULATE #Support for x87 emulation options INET #InterNETworking options FFS #Berkeley Fast Filesystem options NFS #Network Filesystem options MSDOSFS #MSDOS Filesystem options "CD9660" #ISO 9660 Filesystem options PROCFS #Process filesystem options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=1 #Be pessimistic about Joe SCSI device options BOUNCE_BUFFERS #include support for DMA bounce buffers options UCONSOLE #Allow users to grab the console options USERCONFIG #boot -c editor options KTRACE options QUOTA options DDB options SYSVSHM options SYSVSEM options SYSVMSG options USER_LDT #allow user-level control of i386 ldt options SMP options APIC_IO options NCPU=2 options NBUS=2 options NAPIC=1 options NINTR=15 config kernel root on sd0 controller isa0 controller pci0 controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr disk fd0 at fdc0 drive 0 #controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr controller ahc0 controller scbus0 device sd0 device st0 device cd0 device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr device npx0 at isa? port "IO_NPX" irq 13 vector npxintr device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr device lpt0 at isa? port? tty irq 7 vector lptintr device ep0 at isa? port 0x300 net irq 10 vector epintr pseudo-device loop pseudo-device ether pseudo-device log pseudo-device gzip pseudo-device tun 1 pseudo-device pty 16 pseudo-device bpfilter 4