From owner-freebsd-stable@FreeBSD.ORG Thu Jul 7 09:51:01 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DD4F1065670 for ; Thu, 7 Jul 2011 09:51:01 +0000 (UTC) (envelope-from ari@ish.com.au) Received: from fish.ish.com.au (eth5921.nsw.adsl.internode.on.net [59.167.240.32]) by mx1.freebsd.org (Postfix) with ESMTP id 583178FC16 for ; Thu, 7 Jul 2011 09:51:01 +0000 (UTC) Received: from ip-136.ish.com.au ([203.29.62.136]:57529) by fish.ish.com.au with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1Qel34-0000uQ-0r; Thu, 07 Jul 2011 19:39:06 +1000 X-CTCH-RefID: str=0001.0A150201.4E157EBA.0123:SCFSTAT13512334,ss=1,fgs=0 Message-ID: <4E157EB9.4030201@ish.com.au> Date: Thu, 07 Jul 2011 19:39:05 +1000 From: Aristedes Maniatis User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: freebsd-stable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: system internal timer runs 10 times too slow X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2011 09:51:01 -0000 We upgraded an existing system to a new motherboard/CPU and found that timing in various programs is very odd. For example "top" only updates every 10 seconds instead of every second. And this confirms the oddness: # while true; do echo `date`; sleep 1; done Thu Jul 7 19:09:01 EST 2011 Thu Jul 7 19:09:11 EST 2011 Thu Jul 7 19:09:21 EST 2011 10 seconds instead of 1. So I looked first at the kernel timers: # dmesg | grep -i time Timecounter "i8254" frequency 1193182 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 pci3: at device 0.1 (no driver attached) atrtc0: port 0x70-0x71 irq 8 on acpi0 acpi_hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 900 Timecounters tick every 1.000 msec I switched i8254 and then to HPET. No difference. # sysctl -w kern.timecounter.hardware=i8254 kern.timecounter.hardware: ACPI-fast -> i8254 # while true; do echo `date`; sleep 1; done Thu Jul 7 19:09:40 EST 2011 Thu Jul 7 19:09:41 EST 2011 I switched to TSC: # sysctl -w kern.timecounter.hardware=TSC kern.timecounter.hardware: HPET -> TSC # while true; do echo `date`; sleep 1; done Thu Jul 7 19:25:56 EST 2011 Thu Jul 7 19:25:57 EST 2011 Thu Jul 7 19:25:58 EST 2011 Now this looks like it fixed the problem, but actually it is worse. Now the clock matches what you'd expect, but there is still 10 seconds in real time between those date entries. That is, now the system clock is running 10 times too slow as well. # uname -a FreeBSD delish.ish.com.au 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Base board information Manufacturer: ASUSTeK Computer INC. Product Name: P6X58D-E BIOS information Vendor: American Megatrends Inc. Version: 0502 Release Date: 11/16/2010 BIOS Revision: 8.15 CPU Model: Intel(R) Core(TM) i7 CPU 960 @ 3.20GHz Thanks in advance for any help. Ari -- --------------------------> Aristedes Maniatis ish http://www.ish.com.au Level 1, 30 Wilson Street Newtown 2042 Australia phone +61 2 9550 5001 fax +61 2 9550 4001 GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A