- Subject: Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit
- From: "Kuwahara,T." <6vvetjsrt26xsrzlh1z0zn4d2grdah@xxxxxxxxx>
- Date: Wed, 22 Dec 2010 05:57:02 +0900
- Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Christoph Lameter <cl@xxxxxxxxx>, David Miller <davem@xxxxxxxxxxxxx>, John Stultz <johnstul@xxxxxxxxxx>, Krzysztof Halasa <khc@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Rodolfo Giometti <giometti@xxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- In-reply-to: <20101221075612.GA13626@xxxxxxxxxxxxxxxxxxxxxx>
- References: <cover.1292512461.git.richard.cochran@xxxxxxxxxx> <880d82bb8120f73973db27e0c48e949014b1a106.1292512461.git.richard.cochran@xxxxxxxxxx> <AANLkTi=yGoFwYt4p_LeHtAQyYgmURspO-p57UdL0sUEZ@xxxxxxxxxxxxxx> <20101221075612.GA13626@xxxxxxxxxxxxxxxxxxxxxx>
On Tue, Dec 21, 2010 at 4:56 PM, Richard Cochran
<richardcochran@xxxxxxxxx> wrote:
> Can you please elaborate?
The timex.constant is defined as equal to the binary logarithm of the
reciprocal of
the natural frequency minus SHIFT_PLL. In other words, the following
equation holds:
log2(natural frequency) + time_constant + SHIFT_PLL = 0,
which means that decreasing time_constant increases natural frequency
exponentially.
And since a larger natural frequency gives a smaller settling time, a
sufficiently
large negative time_constant results in immediate time step, at least in theory.
> I don't see any way to use timex.constant with ADJ_OFFSET in order to
> correct a time offset.
How about this?
if (txc->modes & ADJ_OFFSET) {
if (txc->constant == INT32_MIN) {
/* step time */
} else {
/* slew time */
}
}
> The 'time_constant' in kernel/time/ntp.c is
> restricted to the interval [0..MAXTC], and MAXTC is 10 in timex.h.
Then let's just ignore the restriction. (It's possible by setting the
timex.constant
without setting the ADJ_TIMECONST flag.)
That said, I'm somehow against the idea of using the adjtimex syscall
for that purpose.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Home]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]