Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2001 06:22:37 -0800 (PST)
From:      Alan Edmonds <kb5zuy@airmail.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/32226: time of day clock runs fast (approx twice as fast) 
Message-ID:  <200111231422.fANEMbS51830@freefall.freebsd.org>

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

>Number:         32226
>Category:       kern
>Synopsis:       time of day clock runs fast (approx twice as fast)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 23 06:30:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Alan Edmonds
>Release:        -current cvsuped 22 Nov
>Organization:
>Environment:
FreeBSD ernest 5.0-CURRENT FreeBSD 5.0-CURRENT #5: Fri Nov 23 09:16:41 GMT 2001   root@ernest:/usr/obj/usr/src/sys/TPAD  i386

>Description:
the time of day clock runs fast.  For example:

$ date; sleep 5; date
Fri Nov 23 14:12:55 GMT 2001
Fri Nov 23 14:13:05 GMT 2001

$ sysctl kern.timecounter.hardware=TSC
$ date; sleep 5; date
Fri Nov 23 14:13:17 GMT 2001
Fri Nov 23 14:13:22 GMT 2001

In both cases, the subjective time was 5 seconds.

Here is a dmesg output.

$ dmesg
Copyright (c) 1992-2001 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 5.0-CURRENT #5: Fri Nov 23 09:16:41 GMT 2001
    root@uk-demo-6:/usr/obj/usr/src/sys/TPAD
Preloaded elf kernel "/boot/kernel/kernel" at 0xc03af000.
Preloaded elf module "/boot/kernel/if_wi.ko" at 0xc03af0a8.
Preloaded elf module "/boot/kernel/snd_pcm.ko" at 0xc03af154.
Preloaded elf module "/boot/kernel/snd_solo.ko" at 0xc03af200.
Preloaded elf module "/boot/kernel/atspeaker.ko" at 0xc03af2b0.
Preloaded elf module "/boot/kernel/apm.ko" at 0xc03af360.
Preloaded elf module "/boot/kernel/acpi.ko" at 0xc03af408.
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 365809290 Hz
CPU: Pentium II/Pentium II Xeon/Celeron (365.81-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x66a  Stepping = 10
  Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
real memory  = 67043328 (65472K bytes)
avail memory = 61493248 (60052K bytes)
Pentium Pro MTRR support enabled
pcibios: No call entry point
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <IBM    Hammer  > on motherboard
acpi0: power button is handled as a fixed feature programming model.
Timecounter "ACPI"  frequency 3579545 Hz
acpi_timer0: <32-bit timer at 3.579545MHz> port 0xf108-0xf10b on acpi0
acpi_cpu0: <CPU> on acpi0
acpi_cpu: CLK_VAL field overflows P_CNT register
acpi_cpu: CLK_VAL field overlaps THT_EN bit
acpi_tz0: <thermal zone> on acpi0
acpi_tz1: <thermal zone> on acpi0
acpi_button0: <Sleep Button> on acpi0
acpi_pcib0: <Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <PCI bus> on acpi_pcib0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
pci0: <simple comms> at device 6.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
pcm0: <ESS Solo-1 (unknown vendor)> port 0x78a4-0x78a7,0x7890-0x7893,0x7870-0x787f,0x7850-0x785f,0x7800-0x783f irq 5 at device 8.0 on pci0
atapci0: <AcerLabs Aladdin ATA33 controller> port 0x78c0-0x78cf irq 15 at device 15.0 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
pci0: <bridge, PCI-unknown> at device 17.0 (no driver attached)
pcic0: <O2micro 6832/6833 PCI-Cardbus Bridge> irq 9 at device 19.0 on pci0
pcic0: PCI Memory allocated: 0x44000000
pcic0: Warning: O2micro OZ68xx chips may not work
pccard0: <PC Card bus (classic)> on pcic0
pcic1: <O2micro 6832/6833 PCI-Cardbus Bridge> irq 9 at device 19.1 on pci0
pcic1: PCI Memory allocated: 0x44001000
pcic1: Warning: O2micro OZ68xx chips may not work
pccard1: <PC Card bus (classic)> on pcic1
ohci0: <AcerLabs M5237 (Aladdin-V) USB controller> mem 0x82100000-0x82100fff irq 10 at device 20.0 on pci0
usb0: OHCI version 1.0, legacy support
usb0: <AcerLabs M5237 (Aladdin-V) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_acad0: <AC adapter> on acpi0
acpi_cmbat0: <Control method Battery> on acpi0
atspeaker0 port 0x61 on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
fdc0: <NEC 72065B or clone> port 0x3f7,0x3f0-0x3f5 irq 6 on acpi0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
ppc0 port 0x3bc-0x3c3 irq 7 on acpi0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppi0: <Parallel I/O> on ppbus0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
acpi_ec0: <embedded controller> port 0x66,0x62 on acpi0
ata-: ata0 already exists, skipping it
ata-: ata1 already exists, skipping it
atkbdc-: atkbdc0 already exists, skipping it
fdc-: fdc0 already exists, skipping it
pcic-: pcic0 already exists, skipping it
pcic-: pcic1 already exists, skipping it
ppc-: ppc0 already exists, skipping it
sc-: sc0 already exists, skipping it
sio-: sio0 already exists, skipping it
vga-: vga0 already exists, skipping it
orm0: <Option ROM> at iomem 0xc0000-0xcbfff on isa0
sc0: <System console> on isa0
sc0: VGA <16 virtual consoles, flags=0x200>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
pmtimer0 on isa0
sio1: configured irq 3 not in bitmap of probed irqs 0
ad0: 4645MB <IBM-DBCA-204860> [10068/15/63] at ata0-master UDMA33
acd0: CDROM <CRN-8241B> at ata1-master PIO4
Mounting root from ufs:/dev/ad0s2a
pccard: card inserted, slot 0
pccard: card removed, slot 0
WARNING: / was not properly dismounted
pccard: card inserted, slot 0
WARNING: /usr was not properly dismounted
/usr: lost blocks 0 files 7
WARNING: /var was not properly dismounted
wi0 at port 0x280-0x2c7 iomem 0xd4000-0xd43ff irq 9 flags 0x10000 slot 0 on pccard0
wi0: Ethernet address: 00:02:b3:04:b8:b8
$

>How-To-Repeat:
See above.


>Fix:
I can fix the problem by setting the kern.timecounter.hardware variable to TSC (instead of ACPI).

>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?200111231422.fANEMbS51830>