From owner-freebsd-stable@FreeBSD.ORG Thu Jul 7 16:55:11 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 F2F531065670 for ; Thu, 7 Jul 2011 16:55:11 +0000 (UTC) (envelope-from ykirill@yahoo.com) Received: from nm24-vm1.bullet.mail.ne1.yahoo.com (nm24-vm1.bullet.mail.ne1.yahoo.com [98.138.90.45]) by mx1.freebsd.org (Postfix) with SMTP id 98D368FC21 for ; Thu, 7 Jul 2011 16:55:11 +0000 (UTC) Received: from [98.138.90.48] by nm24.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jul 2011 16:41:56 -0000 Received: from [98.138.87.2] by tm1.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jul 2011 16:41:56 -0000 Received: from [127.0.0.1] by omp1002.mail.ne1.yahoo.com with NNFMP; 07 Jul 2011 16:41:56 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 493786.61826.bm@omp1002.mail.ne1.yahoo.com Received: (qmail 71381 invoked by uid 60001); 7 Jul 2011 16:41:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1310056916; bh=RFeVeE9Acbm9LPWrGBgIAZoFuGbXI1v68zSSbBqnydQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=QMbTrR19ayaXG7xNtan7SHttjiERRjFdFxV2ZDepc4dcwM1+4JF3tUbMwnRLOD8b2OWuDhtM/J5uVlzBsKO3KKoTt+PGKtGGBYzbHpUVvm5rJdW2murjVBFQ+HYNRswn3kAU3TKs+fZRoMbZwDrGCfTo/VPz6+SlxselMJ1JKF4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=WhwcwfiphdThqWSCwFPWLVX6RohNxXaTNnV3eugFIX6VJvOOxWjWWfZcv/BSrRxSq/3K+TVHN6P56ozCzL3VIHaxwi0qX1L8pkpj4tIYv/kup6Jjs32UfATg6XgbVhRVm2U4NntbhxFZAixPtEjxiGmjTzk/OqO/tGaq4+OgVoo=; Message-ID: <77666.71118.qm@web120527.mail.ne1.yahoo.com> X-YMail-OSG: yzVXkHMVM1k8vtoBVdJ6SabVPbgjEAQsAzEu6zBvbqd.i.s z.6cpJfjoawCeLL.BdkbproyHthW7GZ9ean4bjHaPVCVYxrKaJN3Ob04pBQQ zyNtwGn.Z_HY9MPUorarTERpY_f2MHhoJ9rLwEWQvJ3ihDAoWZa5vl9EYh9X i5BkOEqLokdTYhZL07OfsF4hOKgy2Lkb3V_lS6o58NecmNtTntdQQ5BE1STd iJHJ0N.m8YVUoWGm5u5THwB0v8NijvcPNKrJAv9mFaYjN9G7TeQpjAqghM02 vdghONAGMU.9wupf9fJXa4XdSE2FUGIEs95z2tAsZnDSeVPg3SRdhtGEstnw 6_GvAgC3LLxrFx332EbhU7CBHzFMWNgDNC9RRLV_aq9pa0Pk19LGcHm5DHiu wl0n6oCXhYxhejiGc Received: from [212.45.22.73] by web120527.mail.ne1.yahoo.com via HTTP; Thu, 07 Jul 2011 09:41:54 PDT X-Mailer: YahooMailClassic/14.0.3 YahooMailWebService/0.8.111.304355 Date: Thu, 7 Jul 2011 09:41:54 -0700 (PDT) From: Kirill Yelizarov To: freebsd-stable@freebsd.org In-Reply-To: <20110707095800.GA6295@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: 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 16:55:12 -0000 =0A=0A--- On Thu, 7/7/11, Jeremy Chadwick wrote:= =0A=0A> From: Jeremy Chadwick =0A> Subject: Re: s= ystem internal timer runs 10 times too slow=0A> To: "Aristedes Maniatis" =0A> Cc: "freebsd-stable" =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: at device 0.1 (no driver= =0A> attached)=0A> > atrtc0: port 0x70-0x71 irq 8=0A> o= n acpi0=0A> > acpi_hpet0: 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