Date: Mon, 27 Aug 2001 10:36:47 -0700 (PDT) From: Blapp Martin <mb@imp.ch> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/30135: Time drifting on STABLE SMP when calling gettimeofday(). Message-ID: <200108271736.f7RHal426984@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 30135
>Category: kern
>Synopsis: Time drifting on STABLE SMP when calling gettimeofday().
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 27 10:40:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Blapp Martin
>Release: 4.4-PRERELEASE
>Organization:
Improware AG
>Environment:
FreeBSD xx.xx.xx 4.4-PRERELEASE FreeBSD 4.4-PRERELEASE #1:
Thu Aug 16 15:17:53 CEST 2001
root@xx:/usr/obj/usr/src/sys/DOCSIS i386
>Description:
Serverworks Chipset
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>
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
>How-To-Repeat:
If you produce 100% load with this program on one CPU, the time drifting
happens. The drift is about 10% !!!
It seems that gettimeofday() produces the effect. Other load
does not make anything and seems to be harmless.
#include <sys/types.h>
#include <sys/time.h>
#include <err.h>
int
main(void)
{
for(;;) {
struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz);
}
return (0);
}
>Fix:
Not known.
This is really a severe Problem on bigger servers ! Ntpd gives up after
some minutes cause the jitter is to big, and calling ntpdate all 10 seconds
is not really a solution.
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108271736.f7RHal426984>
