Date: Thu, 7 Jul 2011 09:41:54 -0700 (PDT) From: Kirill Yelizarov <ykirill@yahoo.com> To: freebsd-stable@freebsd.org Subject: Re: system internal timer runs 10 times too slow Message-ID: <77666.71118.qm@web120527.mail.ne1.yahoo.com> In-Reply-To: <20110707095800.GA6295@icarus.home.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
=0A=0A--- On Thu, 7/7/11, Jeremy Chadwick <freebsd@jdc.parodius.com> wrote:= =0A=0A> From: Jeremy Chadwick <freebsd@jdc.parodius.com>=0A> Subject: Re: s= ystem internal timer runs 10 times too slow=0A> To: "Aristedes Maniatis" <a= ri@ish.com.au>=0A> Cc: "freebsd-stable" <freebsd-stable@freebsd.org>=0A> Da= te: Thursday, July 7, 2011, 1:58 PM=0A> On Thu, Jul 07, 2011 at 07:39:05PM= =0A> +1000, Aristedes Maniatis wrote:=0A> > We upgraded an existing system = to a new=0A> motherboard/CPU and found that timing in various programs is= =0A> very odd. For example "top" only updates every 10 seconds=0A> instead = of every second. And this confirms the oddness:=0A> > =0A> > # while true; = do echo `date`; sleep 1; done=0A> > Thu Jul 7 19:09:01 EST 2011=0A> > Thu J= ul 7 19:09:11 EST 2011=0A> > Thu Jul 7 19:09:21 EST 2011=0A> > =0A> > 10 se= conds instead of 1.=0A> > =0A> > =0A> > So I looked first at the kernel tim= ers:=0A> > =0A> > # dmesg | grep -i time=0A> > Timecounter "i8254" frequenc= y 1193182 Hz quality 0=0A> > Timecounter "ACPI-fast" frequency 3579545 Hz q= uality=0A> 1000=0A> > acpi_timer0: <24-bit timer at 3.579545MHz> port=0A> 0= x808-0x80b on acpi0=0A> > pci3: <multimedia, HDA> at device 0.1 (no driver= =0A> attached)=0A> > atrtc0: <AT realtime clock> port 0x70-0x71 irq 8=0A> o= n acpi0=0A> > acpi_hpet0: <High Precision Event Timer> iomem=0A> 0xfed00000= -0xfed003ff on acpi0=0A> > Timecounter "HPET" frequency 14318180 Hz quality= 900=0A> > Timecounters tick every 1.000 msec=0A> > =0A> > =0A> > I switche= d i8254 and then to HPET. No difference.=0A> > =0A> > # sysctl -w kern.time= counter.hardware=3Di8254=0A> > kern.timecounter.hardware: ACPI-fast -> i825= 4=0A> > # while true; do echo `date`; sleep 1; done=0A> > Thu Jul 7 19:09:4= 0 EST 2011=0A> > Thu Jul 7 19:09:41 EST 2011=0A> > =0A> > I switched to TSC= :=0A> > =0A> > # sysctl -w kern.timecounter.hardware=3DTSC=0A> > kern.timec= ounter.hardware: HPET -> TSC=0A> > # while true; do echo `date`; sleep 1; d= one=0A> > Thu Jul 7 19:25:56 EST 2011=0A> > Thu Jul 7 19:25:57 EST 2011=0A>= > Thu Jul 7 19:25:58 EST 2011=0A> > =0A> > Now this looks like it fixed th= e problem, but actually=0A> it is worse. Now the clock matches what you'd e= xpect, but=0A> there is still 10 seconds in real time between those date=0A= > entries. That is, now the system clock is running 10 times=0A> too slow a= s well.=0A> > =0A> > =0A> > # uname -a=0A> > FreeBSD delish.ish.com.au 8.2-= RELEASE FreeBSD=0A> 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011=A0=0A> =A0= =A0=A0root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC=A0=0A> amd64= =0A> > =0A> > Base board information=0A> > Manufacturer: ASUSTeK Computer I= NC.=0A> > Product Name: P6X58D-E=0A> > =0A> > BIOS information=0A> > Vendor= : American Megatrends Inc.=0A> > Version: 0502=0A> > Release Date: 11/16/20= 10=0A> > BIOS Revision: 8.15=0A> > =0A> > CPU Model:=A0=A0=A0 Intel(R) Core= (TM) i7=0A> CPU=A0 =A0 =A0 =A0=A0=A0960=A0 @=0A> 3.20GHz=0A> =0A> Do you ha= ve anything like powerd(8) enabled, or EIST /=0A> Intel SpeedStep=0A> techn= ology enabled in your system BIOS?=A0 If so, can=0A> you try disabling=0A> = powerd and/or disabling EIST/SS?=0A> =0A> Alternately, and this isn't to sa= y FreeBSD doesn't have a=0A> problem, do=0A> you have a replacement/spare m= otherboard you can try?=A0=0A> There's always=0A> the possibility that you = have a bad crystal on the=0A> motherboard and a=0A> replacement board would= rule that out.=0A=0AI also suggest to check you C mode hw.acpi.cpu.cx_lowe= st. I had same behavior on my note some time ago. This happened when i trie= d to use C3 so i stayed at C2.=0A=0AKirill=0A=0A
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?77666.71118.qm>