From owner-freebsd-current@FreeBSD.ORG Tue May 30 23:00:03 2006 Return-Path: X-Original-To: freebsd-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 4958D16B40D for ; Tue, 30 May 2006 23:00:03 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from postfix2-c.free.fr (postfix2-c.free.fr [213.228.0.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD82543D5D for ; Tue, 30 May 2006 22:59:58 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by postfix2-c.free.fr (Postfix) with ESMTP id CA6E8444B8EF for ; Tue, 30 May 2006 23:32:38 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp4-g19.free.fr (Postfix) with ESMTP id 78183526E0 for ; Wed, 31 May 2006 00:32:08 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 3FB9E9B6F8 for ; Tue, 30 May 2006 22:32:27 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 17C494071; Wed, 31 May 2006 00:32:27 +0200 (CEST) Date: Wed, 31 May 2006 00:32:26 +0200 From: Jeremie Le Hen To: freebsd-current@FreeBSD.org Message-ID: <20060530223226.GT1890@obiwan.tataz.chchile.org> References: <20060529153103.GA17178@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060529153103.GA17178@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.11 Cc: Subject: Re: [fbsd] timer goes sluggish 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: Tue, 30 May 2006 23:00:14 -0000 Hi, On Mon, May 29, 2006 at 05:31:03PM +0200, Jeremie Le Hen wrote: > Hi, > > I won't write too much, the following session will tell much more: > > % jarjarbinks:root# ntpdate -b chronos.cru.fr > % 29 May 17:08:44 ntpdate[4254]: step time server 195.220.94.163 offset 0.000273 sec > % jarjarbinks:root# sysctl kern.timecounter.hardware > % kern.timecounter.hardware: ACPI-fast > % jarjarbinks:root# while : ; do date ; sleep 1 ; done > % Mon May 29 17:08:56 CEST 2006 > % Mon May 29 17:09:03 CEST 2006 > % Mon May 29 17:09:09 CEST 2006 > % Mon May 29 17:09:16 CEST 2006 > % Mon May 29 17:09:22 CEST 2006 > % ^C Sometimes, I feel dumb. I noticed that the clock sped up when the CPU makes heavy computing, which meant there was some power saving on idleness. I dug a bit I found that hw.acpi.cpu.cx_lowest=C4. Setting it hw.acpi.cpu.cx_lowest=C1 makes the clock goes ``in time'' :). > % jarjarbinks:root# ntpdate -b chronos.cru.fr > % 29 May 17:09:32 ntpdate[4266]: step time server 195.220.94.163 offset 0.000937 sec > % jarjarbinks:root# sysctl kern.timecounter.hardware=TSC > % kern.timecounter.hardware: ACPI-fast -> TSC > % jarjarbinks:root# while : ; do date ; sleep 1 ; done > % Mon May 29 17:09:41 CEST 2006 > % Mon May 29 17:09:42 CEST 2006 > % Mon May 29 17:09:43 CEST 2006 > % Mon May 29 17:09:44 CEST 2006 > % Mon May 29 17:09:45 CEST 2006 > % ^C > % jarjarbinks:root# ntpdate -b chronos.cru.fr > % 29 May 17:10:16 ntpdate[4278]: step time server 195.220.94.163 offset 29.503343 sec Likewise, we the above sysctl set, this behaviour disappears. However, I think humbly that this breaks POLA. I am pretty confident there is a good technical reason for this, but it is quite puzzling to have the computer clock drifting lagging that much. As an additional question, is there a reason to have performance_cx_lowest="LOW" in etc/defaults/rc.conf ? Thank you ! Best regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >