From owner-freebsd-current Wed Nov 6 4:26:56 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B088A37B401; Wed, 6 Nov 2002 04:26:50 -0800 (PST) Received: from day.anthologeek.net (day.anthologeek.net [213.91.4.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D5AC43E7B; Wed, 6 Nov 2002 04:26:49 -0800 (PST) (envelope-from sw@anthologeek.net) Received: by day.anthologeek.net (Postfix, from userid 1000) id 916D317317; Wed, 6 Nov 2002 13:26:31 +0100 (CET) Date: Wed, 6 Nov 2002 13:26:31 +0100 From: Sameh Ghane To: freebsd-current@freebsd.org Cc: phk@freebsd.org Subject: time counter / time ticking or hardware issues Message-ID: <20021106122631.GA93442@anthologeek.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline User-Agent: Mutt/1.4i X-PGP-Keys: 0x1289F00D: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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 AMD Features=0xffffffff80000800 real memory = 134201344 (131056K bytes) avail memory = 124436480 (121520K bytes) Initializing GEOMetry subsystem K6-family MTRR support enabled (2 registers) npx0: on motherboard npx0: INT 16 interface acpi0: 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: on acpi0 pcib0: 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: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci0: at device 3.0 (no driver attached) isab0: at device 7.0 on pci0 isa0: 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: 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: on xl1 xlphy1: <3c905C 10/100 internal PHY> on miibus1 xlphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pci0: at device 12.0 (no driver attached) ahc0: 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: 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: PRINTER MLC,PCL,PJL lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 sio0 port 0x3f8-0x3ff irq 4 on acpi0 sio0: type 16550A atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 psm0: irq 12 on atkbdc0 psm0: model IntelliMouse, device ID 3 orm0: