Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2002 13:26:31 +0100
From:      Sameh Ghane <sw@anthologeek.net>
To:        freebsd-current@freebsd.org
Cc:        phk@freebsd.org
Subject:   time counter / time ticking or hardware issues
Message-ID:  <20021106122631.GA93442@anthologeek.net>

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

--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi!

I experienced (I think it corresponds to the last big phk's changes in the time
counter handling) issues with my clock on current.

It just ticks twice too fast.

To know if it comes from the hardware clock or the kernel, I attached my
dmesg.boot.

The issue can be shortened to this:
core:[~]>time sleep 5
0.000u 0.002s 0:09.96 0.0%      0+0k 0+0io 0pf+0w

This might help debugging:
core:[~]>sysctl kern.timecounter ; sleep 5 && echo ; sysctl kern.timecounter
kern.timecounter.nbinuptime: 157435124
kern.timecounter.nnanouptime: 3
kern.timecounter.nmicrouptime: 0
kern.timecounter.nbintime: 1703138
kern.timecounter.nnanotime: 34
kern.timecounter.nmicrotime: 1703104
kern.timecounter.ngetbinuptime: 0
kern.timecounter.ngetnanouptime: 41327
kern.timecounter.ngetmicrouptime: 15327675
kern.timecounter.ngetbintime: 0
kern.timecounter.ngetnanotime: 15900
kern.timecounter.ngetmicrotime: 49512577
kern.timecounter.hardware: ACPI-safe
kern.timecounter.tick: 10000

kern.timecounter.nbinuptime: 157436469
kern.timecounter.nnanouptime: 3
kern.timecounter.nmicrouptime: 0
kern.timecounter.nbintime: 1703158
kern.timecounter.nnanotime: 34
kern.timecounter.nmicrotime: 1703124
kern.timecounter.ngetbinuptime: 0
kern.timecounter.ngetnanouptime: 41329
kern.timecounter.ngetmicrouptime: 15327831
kern.timecounter.ngetbintime: 0
kern.timecounter.ngetnanotime: 15900
kern.timecounter.ngetmicrotime: 49513102
kern.timecounter.hardware: ACPI-safe
kern.timecounter.tick: 10000

I tried 3 different -current kernels since phk's first commit, all having this
behavior.

I don't remember how old my kernel is, it's Thu Dec  5 23:49:20 CET 2002 here :)

If it's hardawre related, where is the best place in the kernel to just slow it
down by a factor of 2 ?

Cheers,

-- 
Sameh

--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="dmesg.boot"

Copyright (c) 1992-2002 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 29 06:15:17 CET 2002
    sw@core.pourIX.net:/var/obj/var/src/sys/CORE
Preloaded elf kernel "/boot/kernel/kernel" at 0xc053f000.
Preloaded elf module "/boot/kernel/acpi.ko" at 0xc053f0a8.
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 332755591 Hz
CPU: AMD-K6(tm) 3D processor (332.76-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x58c  Stepping = 12
  Features=0x8021bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX>
  AMD Features=0xffffffff80000800<SYSCALL,3DNow!>
real memory  = 134201344 (131056K bytes)
avail memory = 124436480 (121520K bytes)
Initializing GEOMetry subsystem
K6-family MTRR support enabled (2 registers)
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <ASUS   P5A     > on motherboard
Using $PIR table, 8 entries at 0xc00f0b40
acpi0: power button is handled as a fixed feature programming model.
Timecounter "ACPI-safe"  frequency 3579545 Hz
acpi_timer0: <24-bit timer at 3.579545MHz> port 0xec08-0xec0b on acpi0
acpi_cpu0: <CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
---- initial configuration ------------------------
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.12.0
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.12.1
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.12.2
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.12.3
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.11.0
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.11.1
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.11.2
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.11.3
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.10.0
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.10.1
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.10.2
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.10.3
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.9.0
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.9.1
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.9.2
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.9.3
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.13.0
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.13.1
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.13.2
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.13.3
\\_SB_.LNKE irq   0: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.2.0
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.2.1
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.2.2
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.2.3
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.1.0
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.1.1
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.1.2
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.1.3
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.6.0
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.6.1
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.6.2
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.6.3
---- before setting priority for links ------------
\\_SB_.LNKE:
	interrupts:	     1     3     4     5     6     7     9    10    11    12    14    15
	penalty:	100110  1810  1110   910  1110  1110   110   910   910  1110 10110 10110
	references:	1
	priority:	0
---- before fixup boot-disabled links -------------
\\_SB_.LNKE:
	interrupts:	     1     3     4     5     6     7     9    10    11    12    14    15
	penalty:	100110  1810  1110   910  1110  1110   110   910   910  1110 10110 10110
	references:	1
	priority:	10785
---- after fixup boot-disabled links --------------
---- arbitrated configuration ---------------------
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.12.0
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.12.1
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.12.2
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.12.3
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.11.0
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.11.1
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.11.2
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.11.3
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.10.0
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.10.1
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.10.2
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.10.3
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.9.0
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.9.1
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.9.2
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.9.3
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.13.0
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.13.1
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.13.2
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.13.3
\\_SB_.LNKE irq   9: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.2.0
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.2.1
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.2.2
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.2.3
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.1.0
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.1.1
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.1.2
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.1.3
\\_SB_.LNKC irq   5: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.6.0
\\_SB_.LNKD irq   3: [  1  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.6.1
\\_SB_.LNKA irq  11: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.6.2
\\_SB_.LNKB irq  10: [  3  4  5  6  7  9 10 11 12 14 15] low,level,sharable 0.6.3
pci0: <ACPI PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci0: <bridge, PCI-unknown> at device 3.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xd800-0xd87f mem 0xe3000000-0xe300007f irq 3 at device 9.0 on pci0
xl0: Ethernet address: 00:10:4b:b4:8b:a1
miibus0: <MII bus> on xl0
xlphy0: <3Com internal media interface> on miibus0
xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
xl1: <3Com 3c905C-TX Fast Etherlink XL> port 0xd400-0xd47f mem 0xe2800000-0xe280007f irq 10 at device 11.0 on pci0
xl1: Ethernet address: 00:04:76:11:d4:75
miibus1: <MII bus> on xl1
xlphy1: <3c905C 10/100 internal PHY> on miibus1
xlphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pci0: <display, VGA> at device 12.0 (no driver attached)
ahc0: <Adaptec 2940 Ultra2 SCSI adapter> port 0xb800-0xb8ff mem 0xe0000000-0xe0000fff irq 3 at device 13.0 on pci0
aic7890/91: Ultra2 Wide Channel A, SCSI Id=1, 32/253 SCBs
atapci0: <AcerLabs Aladdin ATA33 controller> port 0xb400-0xb40f at device 15.0 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
ppc0 port 0x778-0x77b,0x378-0x37f irq 7 drq 3 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/7 bytes threshold
ppbus0: IEEE1284 device found /NIBBLE/ECP
Probing for PnP devices on ppbus0:
ppbus0: <Hewlett-Packard HP LaserJet 1100.1.1> PRINTER MLC,PCL,PJL
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
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 IntelliMouse, device ID 3
orm0: <Option ROMs> at iomem 0xcc000-0xd17ff,0xc8000-0xc87ff,0xc0000-0xc7fff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 10.000 msec
ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default
DUMMYNET initialized (011031)
IP Filter: v3.4.29 initialized.  Default = pass all, Logging = enabled
Waiting 3 seconds for SCSI devices to settle
da0 at ahc0 bus 0 target 6 lun 0
da0: <DEC RZ1CF-BF (C) DEC 1614> Fixed Direct Access SCSI-2 device 
da0: 40.000MB/s transfers (20.000MHz, offset 31, 16bit), Tagged Queueing Enabled
da0: 4091MB (8380080 512 byte sectors: 255H 63S/T 521C)
da1 at ahc0 bus 0 target 8 lun 0
da1: <QUANTUM ATLAS_V__9_WLS 0230> Fixed Direct Access SCSI-3 device 
da1: 40.000MB/s transfers (20.000MHz, offset 63, 16bit), Tagged Queueing Enabled
da1: 8755MB (17930694 512 byte sectors: 255H 63S/T 1116C)
Mounting root from ufs:/dev/da0s1a

--zhXaljGHf11kAtnf--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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