sys_fuzzMime-Version: 1.0

Gary E. Miller gem at rellim.com
Tue Jan 24 21:59:32 UTC 2017


Yo Hal!

On Tue, 24 Jan 2017 13:46:59 -0800
Hal Murray <hmurray at megapathdsl.net> wrote:

> gem at rellim.com said:
> > Makes no sense to me.  Adding randomness helps when you have
> > hysteresis, stiction, friction, lash and some other things, but
> > none of those apply to NTP.  
> 
> The NTP case is roughly stiction.  Remember the age of this code.  It
> was working long before CPUs had instructions to read a cycle
> counter.  Back then, the system clock was updated on the scheduler
> interrupt.  There was no interpolation between ticks.

You gotta squint real hard to see that as stiction, but not worth 
debating the proper word.  So it may have mattered back then, but
do we need to carry this legacy code.

> Mark/Eric: Can you guarantee that we will never run on a system with
> a crappy clock?  In this context, crappy means one that takes big
> steps.

The has nothing to do with clock steps, this has to do with how
fast the clock can be read.

> I thinnk that all Gary's test proved is that his system doesn't have
> a crappy clock.

Yes, more testing required.  You got ideas what to test next?

> There is an additional worm in this can.  Some OSes with crappy
> clocks bumped the clock by a tiny bit each time you read it so that
> all clock-reads returned different results and you could use it for
> making unique IDs. 

This is a POSIX requirement for CLOCK_MONOTONIC.  Also unrelated to
how fast the clock can be read.

> If we are serious about getting rid of that code, I'll put
> investigating that area higher on my list.  I  think we have more
> important things to do.

Yes, not high on the list, but so easy to test, and so long to get
results, that it is worth thinking about.  Anytime we can remove
unneeded code and noise from ntpd it is good.  I figure we could
remove 100 LOC easy.

Some of these older systems, like G5 Macintosh, may be a good test.

Prolly should test in some VM's too.

In libntp/systime.c, I just make set_sys_fuzz() always set the sys_fuzz
to 0.0:

{
+       fuzz_val = 0.0;  /* GEM */
        sys_fuzz = fuzz_val;

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170124/a020020b/attachment.bin>


More information about the devel mailing list