1
0

patch-ntpd_h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. $Id$
  2. ‣ OFFSET_ARRAY_SIZE
  3. pull in the following diff from MirBSD:
  4. | Commit ID: 100470A1C1009540C55
  5. | CVSROOT: /cvs
  6. | Module name: src
  7. | Changes by: tg@herc.mirbsd.org 2007/10/08 12:04:34 UTC
  8. |
  9. | Modified files:
  10. | usr.sbin/ntpd : ntpd.h
  11. |
  12. | Log message:
  13. | reduce the number of probes in the clock filter down to 4, so that adjtime
  14. | is called at least approx. 3 times a hour, greatly helping us to reduce the
  15. | size of the spikes for systems with clock drift (but increasing susceptibi-
  16. | lity to latency-induced low-quality responses)
  17. |
  18. | tested on herc/rant with a value of 3 (adjust about 4 times an hour)
  19. |
  20. | XXX this should be made an ntpd.conf option instead of a define ASAP
  21. | XXX this should be reverted once we have adjfreq(2)
  22. but we use 3 here due to employment of adjtimex() which reduces
  23. usability of older deltas
  24. ‣ SETTIME_MIN_OFFSET
  25. reduce the minimum required time offset for 'ntpd -s' to
  26. use settimeofday() instead of adjtime(), in order to provide
  27. a faster time setting at start, since adjusting can take ages
  28. --- openntpd-3.9p1.orig/ntpd.h Sun May 14 05:28:58 2006
  29. +++ openntpd-3.9p1/ntpd.h Mon Oct 8 12:17:58 2007
  30. @@ -55,8 +55,12 @@
  31. #define QSCALE_OFF_MAX 0.50
  32. #define QUERYTIME_MAX 15 /* single query might take n secs max */
  33. -#define OFFSET_ARRAY_SIZE 8
  34. -#define SETTIME_MIN_OFFSET 180 /* min offset for settime at start */
  35. +#ifdef USE_ADJTIMEX
  36. +#define OFFSET_ARRAY_SIZE 3 /* so they get invalidated faster */
  37. +#else
  38. +#define OFFSET_ARRAY_SIZE 4 /* min. 3, recommended 6, max. 8 */
  39. +#endif
  40. +#define SETTIME_MIN_OFFSET 12 /* min offset for settime at start */
  41. #define SETTIME_TIMEOUT 15 /* max seconds to wait with -s */
  42. #define LOG_NEGLIGEE 128 /* negligible drift to not log (ms) */