From owner-freebsd-current@FreeBSD.ORG Wed Mar 22 22:44:03 2006 Return-Path: X-Original-To: current@freebsd.org 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 EE4AE16A41F; Wed, 22 Mar 2006 22:44:02 +0000 (UTC) (envelope-from msobolyev@digifonica.com) Received: from mail.emmplus.ie (mail.emmplus.ie [66.154.97.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FEB943D70; Wed, 22 Mar 2006 22:43:53 +0000 (GMT) (envelope-from msobolyev@digifonica.com) Received: from localhost (localhost [127.0.0.1]) by mail.emmplus.ie (Postfix) with ESMTP id 0FC0CB4F18; Wed, 22 Mar 2006 22:42:49 +0000 (GMT) Received: from mail.emmplus.ie ([127.0.0.1]) by localhost (cohiba.emmplus.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26472-06; Wed, 22 Mar 2006 22:42:48 +0000 (GMT) Received: from [192.168.1.46] (unknown [204.244.149.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.emmplus.ie (Postfix) with ESMTP id CB0FDB4A94; Wed, 22 Mar 2006 22:42:47 +0000 (GMT) Message-ID: <4421D322.3010901@digifonica.com> Date: Wed, 22 Mar 2006 14:43:46 -0800 From: Maksym Sobolyev User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: phk@freebsd.org Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at emmplus.ie X-Mailman-Approved-At: Thu, 23 Mar 2006 02:54:52 +0000 Cc: "current@freebsd.org" Subject: timecounting with TSC doesn't work properly on my notebook X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 22:44:03 -0000 Hi, After updating to the recent current (previous one was circa end-2005) I have found that time on machine goes by 3-4 times faster than wallclock with TSC timecounter. Selecting ACPI-safe instead helps. $ sysctl -a | grep timeco kern.timecounter.stepwarnings: 0 kern.timecounter.nbinuptime: 23605635 kern.timecounter.nnanouptime: 0 kern.timecounter.nmicrouptime: 2507479 kern.timecounter.nbintime: 5702952 kern.timecounter.nnanotime: 17926 kern.timecounter.nmicrotime: 5685024 kern.timecounter.ngetbinuptime: 997735 kern.timecounter.ngetnanouptime: 3704 kern.timecounter.ngetmicrouptime: 7930898 kern.timecounter.ngetbintime: 0 kern.timecounter.ngetnanotime: 36 kern.timecounter.ngetmicrotime: 15325858 kern.timecounter.nsetclock: 3 kern.timecounter.hardware: ACPI-safe kern.timecounter.choice: TSC(800) ACPI-safe(1000) i8254(0) dummy(-1000000) kern.timecounter.tick: 1 I have used TSC since it works better with VmWare (I dual boot this system - both on real hardware and in vmware). Is it something we can fix? -Maxim Copyright (c) 1992-2006 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 7.0-CURRENT #23: Mon Mar 27 08:42:26 PST 2006 root@notebook:/usr/src/sys/i386/compile/NOTEBOOK Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 Mobile CPU 2.00GHz (450.77-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf24 Stepping = 4 Features=0x3febf9ff real memory = 1072627712 (1022 MB) avail memory = 1041293312 (993 MB) kbd1 at kbdmux0 acpi0: on motherboard acpi0: Power Button (fixed) acpi_ec0: port 0x62,0x66 on acpi0 Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0 cpu0: on acpi0 acpi_perf0: on cpu0 pcib0: port 0xcf8-0xcff,0xf0cb-0xf0cd on acpi0 pci0: on pcib0 agp0: on hostb0 pcib1: at device 1.0 on pci0 pci1: on pcib1 vgapci0: mem 0xe9000000-0xe9ffffff,0xec000000-0xefffffff,0xea000000-0xea07ffff irq 9 at device 0.0 on pci1 pci0: at device 6.0 (no driver attached) isab0: at device 7.0 on pci0 isa0: on isab0 pci0: at device 8.0 (no driver attached) wi0: mem 0xe8008000-0xe8008fff at device 9.0 on pci0 wi0: using RF:PRISM2.5 MAC:ISL3874A(Mini-PCI) wi0: Intersil Firmware: Primary (1.1.0), Station (1.4.9) wi0: Ethernet address: 00:d0:59:44:5a:f6 cbb0: at device 10.0 on pci0 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 uhci0: port 0x1800-0x181f irq 11 at device 11.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x1820-0x183f irq 10 at device 11.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered ehci0: mem 0xe8002000-0xe80020ff at device 11.2 on pci0 ehci0: [GIANT-LOCKED] usb2: EHCI version 0.95 usb2: companion controllers, 2 ports each: usb0 usb1 usb2: on ehci0 usb2: USB revision 2.0 uhub2: on usb2 uhub2: 4 ports with 4 removable, self powered umass0: on uhub2 fwohci0: mem 0xe8002800-0xe8002fff,0xe8004000-0xe8007fff at device 12.0 on pci0 fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:c0:9f:00:00:05:4f:27 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:c0:9f:05:4f:27 fwe0: Ethernet address: 02:c0:9f:05:4f:27 fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1840-0x184f at device 16.0 on pci0 atapci0: using PIO transfers above 137GB as workaround for 48bit DMA access bug, expect reduced performance ata0: on atapci0 ata1: on atapci0 pci0: at device 17.0 (no driver attached) sis0: port 0x1c00-0x1cff mem 0xe8003000-0xe8003fff irq 5 at device 18.0 on pci0 sis0: Silicon Revision: DP83815D miibus0: on sis0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto sis0: Ethernet address: 00:c0:9f:15:82:88 acpi_button0: on acpi0 acpi_lid0: on acpi0 acpi_acad0: on acpi0 battery0: on acpi0 acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] npx0: [FAST] npx0: on motherboard npx0: INT 16 interface pmtimer0 on isa0 orm0: at iomem 0xc0000-0xcf7ff,0xd4000-0xd47ff,0xdf000-0xdffff,0xe0000-0xe3fff pnpid ORM0000 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 8250 or not responding sio0: [FAST] sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 uhub3: on uhub0 uhub3: 3 ports with 2 removable, bus powered ukbd0: on uhub3 kbd2 at ukbd0 uhid0: on uhub3 Timecounter "TSC" frequency 450774884 Hz quality 800 Timecounters tick every 100.000 msec ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding enabled, default to accept, logging disabled fwohci0: node_id=0xc000ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) ad0: 57231MB at ata0-master UDMA100 acd0: CDRW at ata1-master PIO4