NTPD unable to adjust local clock

Matthew Dillon dillon at apollo.backplane.com
Wed Apr 6 12:12:32 PDT 2005


:I would send a box with a timer doing more than 30ms / 60s back immediately.
:Oscillating clocks are not a problem (as in: oscillating vs. the referencer
:time), the question is how big that difference is. I'm pretty sure now
:that the current behaviour is simply a bug in the offset determination code.
:I just have to think how to best fix it.
:
:Somewhat related, what do you think about the attached patch? It removes
:the limitation of adjtime working only in steps of tickadj (30ms).
:
:Joerg

    No, it's 30ms over 60 seconds.  The actual adjustment is tickdelta 
    microseconds per tick... which is much, much less then 30ms.  Since
    there isn't much of a point making adjtime() accurate down to the
    microsecond (since it has no PLL capability), I don't think that change
    would benefit us much.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>


:Index: kern_clock.c
:===================================================================
:RCS file: /home/joerg/wd/repository/dragonflybsd/src/sys/kern/kern_clock.c,v
:retrieving revision 1.31
:diff -u -r1.31 kern_clock.c
:--- kern_clock.c	13 Mar 2005 21:33:47 -0000	1.31
:+++ kern_clock.c	6 Apr 2005 18:21:55 -0000
:@@ -312,6 +312,8 @@
: 		    --basetime.tv_sec;
: 		}
: 		timedelta -= tickdelta;
:+		if (timedelta > 0 && timedelta < tickdelta)
:+		    tickdelta = timedelta;
: 		rel_mplock();
: 	    }
: 
:Index: kern_time.c
:===================================================================
:RCS file: /home/joerg/wd/repository/dragonflybsd/src/sys/kern/kern_time.c,v
:retrieving revision 1.19
:diff -u -r1.19 kern_time.c
:--- kern_time.c	29 Mar 2005 00:35:55 -0000	1.19
:+++ kern_time.c	6 Apr 2005 18:21:55 -0000
:@@ -460,8 +460,10 @@
: 		ntickdelta = 10 * tickadj;
: 	else
: 		ntickdelta = tickadj;
:+#if 0
: 	if (ndelta % ntickdelta)
: 		ndelta = ndelta / ntickdelta * ntickdelta;
:+#endif
: 
: 	/*
: 	 * To make hardclock()'s job easier, make the per-tick delta negative
:
:--HcAYCG3uE/tztfnV--






More information about the Users mailing list