From owner-freebsd-smp Thu Jun 21 5:35:15 2001 Delivered-To: freebsd-smp@freebsd.org Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by hub.freebsd.org (Postfix) with ESMTP id CC7B137B401 for ; Thu, 21 Jun 2001 05:35:10 -0700 (PDT) (envelope-from mb@imp.ch) Received: from levais.imp.ch (levais.imp.ch [157.161.4.66]) by mail.imp.ch (8.11.1/8.11.1) with ESMTP id f5LCZAl24383 for ; Thu, 21 Jun 2001 14:35:10 +0200 (CEST) (envelope-from Martin.Blapp@imp.ch) Date: Thu, 21 Jun 2001 14:39:09 +0200 (CEST) From: Martin Blapp To: Subject: RE: clock speedup on SMP boxes Message-ID: <20010621143000.I766-100000@levais.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, We have seen this timedrifting here too on a 4.3 RELEASE. We have some busy SMP mysql servers, and from time to time a mysql prozess hangs get stuck in poll() and gettimeofday(). With a normal for loop, or a busy system we do not see a noticable time drifting, but if we start this (below attached) little program here, we see a severe time drifting, the clock runs much faster ! Our servers here are big SMP servers from Siemens. Here is some dmesg output: Timecounter "i8254" frequency 1193182 Hz CPU: Pentium III/Pentium III Xeon/Celeron (933.37-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x686 Stepping = 6 Features=0x383fbff real memory = 1073721344 (1048556K bytes) avail memory = 1040846848 (1016452K bytes) Changing APIC ID for IO APIC #1 from 3 to 1 in MP table Changing APIC ID for IO APIC #1 from 3 to 1 on chip Programming 16 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 Programming 16 pins in IOAPIC #1 FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 3, version: 0x00040011, at 0xfee00000 cpu1 (AP): apic id: 0, version: 0x00040011, at 0xfee00000 io0 (APIC): apic id: 2, version: 0x000f0011, at 0xfec00000 io1 (APIC): apic id: 1, version: 0x000f0011, at 0xfec01000 IOAPIC #1 intpin 4 -> irq 2 IOAPIC #1 intpin 2 -> irq 10 APIC_IO: Testing 8254 interrupt delivery APIC_IO: Broken MP table detected: 8254 is not connected to IOAPIC #0 intpin 2 APIC_IO: routing 8254 via 8259 and IOAPIC #0 intpin 0 And here the test programm which produces the time drifting. #include #include #include #include #include #define DATA "/dev/zero" int main(void) { int fd; struct pollfd pfd; fd = open(DATA, O_RDONLY); if(fd < 0) { err(1, "open()"); } for(;;) { int nfds; struct timeval tv; struct timezone tz; pfd.fd = fd; pfd.events = POLLRDNORM; pfd.revents = 0; nfds = poll(&pfd, 1, 0); gettimeofday(&tv, &tz); } return (0); } Martin Blapp, mb@imp.ch ------------------------------------------------ Improware AG, UNIX solution and service provider Zurlindenstrasse 29, 4133 Pratteln, Switzerland Phone: +41 79 370 26 05, Fax: +41 61 826 93 01 ------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message