From owner-svn-src-all@FreeBSD.ORG Fri Mar 18 07:20:38 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31DBF106566C; Fri, 18 Mar 2011 07:20:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id C03FF8FC16; Fri, 18 Mar 2011 07:20:37 +0000 (UTC) Received: from c122-107-125-80.carlnfd1.nsw.optusnet.com.au (c122-107-125-80.carlnfd1.nsw.optusnet.com.au [122.107.125.80]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p2I7KTEx019208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Mar 2011 18:20:31 +1100 Date: Fri, 18 Mar 2011 18:20:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jung-uk Kim In-Reply-To: <201103171706.12993.jkim@FreeBSD.org> Message-ID: <20110318172852.L1182@besplex.bde.org> References: <201103161644.p2GGi8ug098283@svn.freebsd.org> <20110317200156.GB65858@server.vk2pj.dyndns.org> <201103171706.12993.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Peter Jeremy Subject: Re: svn commit: r219700 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2011 07:20:38 -0000 On Thu, 17 Mar 2011, Jung-uk Kim wrote: > On Thursday 17 March 2011 04:01 pm, Peter Jeremy wrote: >> On 2011-Mar-16 16:44:08 +0000, Jung-uk Kim wrote: >>> Log: >>> Revert r219676. >> >> Thanks also. For extra kudos, how about adding a similar function >> to allow the HPET frequency to be over-ridden. That is currently >> the only timecounter that does not allow the user to compensate for >> incorrect hardware frequencies. > > I really hate the idea of adjusting timecounter frequency from > userland. I guess "use ntpd(8)" is not a good answer for some > people. :-( I use ntpd, and also adjust the timecounter frequency so that: - when the timecounter is the TSC, ntpd has less work to do. It syncs faster and its adjustments are smaller, giving less jitter. - there is only 1 place to change when the TSC frequency changes. Instead of changing the driftfile and restarting ntpd to resync after every frequency change, I set the TSC as accurately as possible (normally to within 1 ppm for the current frequency setting), so that ntpd can resync automatically just as easily as it can handle small termperature-related drifts. If you use a sloppy DELAY()-based calibration or a nominal frequency, then you can easily have an error of 50 ppm or more. ntpd will take hours to resync with that. By resync, I mean that the error is usually less than a millisecond and has low variance. - the TSC it is as accurate as possible for other purposes, irrespective of whether it is used for the timecounter. Bruce