Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Mar 2011 18:20:29 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Jung-uk Kim <jkim@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Peter Jeremy <peterjeremy@acm.org>
Subject:   Re: svn commit: r219700 - head/sys/x86/x86
Message-ID:  <20110318172852.L1182@besplex.bde.org>
In-Reply-To: <201103171706.12993.jkim@FreeBSD.org>
References:  <201103161644.p2GGi8ug098283@svn.freebsd.org> <20110317200156.GB65858@server.vk2pj.dyndns.org> <201103171706.12993.jkim@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

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 <jkim@FreeBSD.org> 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


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110318172852.L1182>