lkml.org 
[lkml]   [2007]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectntp.c : possible inconsistency?
Date
Hi,

trying to find reasons for some crazy ntpd-behavior I read
http://lkml.org/lkml/2006/10/27/67

This thread doesn't result in a pulished patch, so I (hopefully) did what was
said there. The patch doesn't break my system, but it doesn't change ntpd's
crazyness too.
Nevertheless it should be discussed again in the sense of preventing an
inconsistency.

Bernhard


PS:
Can someone point me to the reason for doing txc->constant + 4, please?

References:
lkml-thread (start)
http://lkml.org/lkml/2006/10/26/47

ntpd-crazyness (comparing 2.6.15 with 2.6.19)
http://ml.enneenne.com/pipermail/linuxpps/2006-December/000482.html

Patch:
index 3afeaa3..36d7ecc 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -263,7 +263,7 @@ int do_adjtimex(struct timex *txc)
result = -EINVAL;
goto leave;
}
- time_constant = min(txc->constant + 4, (long)MAXTC);
+ time_constant = min(txc->constant + 4, (long)MAXTC + 4);
}

if (txc->modes & ADJ_OFFSET) { /* values checked earlier */
@@ -329,7 +329,7 @@ leave: if ((time_status & (STA_UNSYNC|
STA_CLOCKERR)) != 0)
txc->maxerror = time_maxerror;
txc->esterror = time_esterror;
txc->status = time_status;
- txc->constant = time_constant;
+ txc->constant = time_constant - 4;
txc->precision = 1;
txc->tolerance = MAXFREQ;
txc->tick = tick_usec;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-01-10 15:31    [W:0.044 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site