Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jun 2001 14:39:09 +0200 (CEST)
From:      Martin Blapp <mb@imp.ch>
To:        <smp@FreeBSD.org>
Subject:   RE: clock speedup on SMP boxes
Message-ID:  <20010621143000.I766-100000@levais.imp.ch>

next in thread | raw e-mail | index | archive | help

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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
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 <sys/types.h>
#include <sys/time.h>
#include <err.h>
#include <fcntl.h>
#include <poll.h>

#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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010621143000.I766-100000>