Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1238592

Re: [PATCH 2/2 (v2)] kselftest: timers: Add adjtick test to validate adjtimex() tick adjustments

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2 (v2)] kselftest: timers: Add adjtick test to validate adjtimex() tick adjustments
Date 2015-10-02 22:30 +0200
Message-ID <qff7R-5Cf-31@gated-at.bofh.it> (permalink)
References (2 earlier) <q78PU-Wx-11@gated-at.bofh.it> <q7e8W-8uF-15@gated-at.bofh.it> <q7eBX-QH-11@gated-at.bofh.it> <q8DeW-Je-15@gated-at.bofh.it> <qff7P-5Cf-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Oct 2, 2015 at 1:25 PM, John Stultz <john.stultz@linaro.org> wrote:
> On Mon, Sep 14, 2015 at 7:48 AM, Miroslav Lichvar <mlichvar@redhat.com> wrote:
>> Is there a cheap way to calculate this?
>> xtime_remainder * (ntp_tick >> ntp_error_shift) / NTP_INTERVAL_LENGTH
>
>
>
> Hrm.. So
>    xtime_remainder = (NTP_INTERVAL_LENGTH <<
> tk->tkr_mono.clock->shift) - (tk->cycle_interval *
> tk->tkr_mono.clock->mult)
>
>    for simplificiation:
>
> And we want to scale it as you pointed out above (though slightly
> fixed here) by:
>          (tk->ntp_tick >> tk->ntp_error_shift) / (NTP_INTERVAL_LENGTH
> << tk->tkr_mono.clock->shift)
>
>
> So this comes  out to:
>
>
> (tk->ntp_tick ) -  (tk->ntp_tick ) *  (tk->cycle_interval *
> tk->tkr_mono.clock->mult) / (NTP_INTERVAL_LENGTH <<
> tk->tkr_mono.clock->shift)
> tk->ntp_error_shift
>
>
>
> would:
>
> xtime_remainder = (tk->ntp_tick >> ntp_error_shift) - tk->xtime_interval
>
> After we've adjusted xtime_interval give us the equivalent?

Bah.. Ignore the above here. I was still working out a calculation and
accidentally hit send.

-john
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 2/2 (v2)] kselftest: timers: Add adjtick test to validate  adjtimex() tick adjustments John Stultz <john.stultz@linaro.org> - 2015-10-02 22:30 +0200
  Re: [PATCH 2/2 (v2)] kselftest: timers: Add adjtick test to validate  adjtimex() tick adjustments John Stultz <john.stultz@linaro.org> - 2015-10-02 22:30 +0200

csiph-web