[git commit] ntpd: increase SLEW_THRESHOLD from 0.125 to 0.5

Denys Vlasenko vda.linux at googlemail.com
Fri Feb 15 13:32:08 UTC 2019


commit: https://git.busybox.net/busybox/commit/?id=8502fa8747e962f69084be09ff8b930e0fb0c449
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Linux kernel supports it since ~2006

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/ntpd.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/networking/ntpd.c b/networking/ntpd.c
index 855815ece..0f474bc09 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -177,12 +177,11 @@
  */
 #define STEP_THRESHOLD     1
 /* Slew threshold (sec): adjtimex() won't accept offsets larger than this.
- * Using exact power of 2 (1/8) results in smaller code
+ * Using exact power of 2 (1/8, 1/2 etc) results in smaller code
  */
-#define SLEW_THRESHOLD 0.125
-//^^^^^^^^^^^^^^^^^^^^^^^^^^ TODO: man adjtimex about tmx.offset:
-// "Since Linux 2.6.26, the supplied value is clamped to the range (-0.5s, +0.5s)"
-// - can use this larger value instead?
+#define SLEW_THRESHOLD   0.5
+// ^^^^ used to be 0.125.
+// Since Linux 2.6.26 (circa 2006), kernel accepts (-0.5s, +0.5s) range
 
 /* Stepout threshold (sec). std ntpd uses 900 (11 mins (!)) */
 //UNUSED: #define WATCH_THRESHOLD  128


More information about the busybox-cvs mailing list