Re: Possible bug in timecounter code

2012-09-04 Thread Stefan Fritsch
On Monday 03 September 2012, Stefan Fritsch wrote: > On Sunday 02 September 2012, s...@sfritsch.de wrote: > > But it may still be a problem the other way round. If > > adjtimedelta would go to zero during the lost ticks, there will > > be some over-compensation that is not detected. > > After som

Re: Possible bug in timecounter code

2012-09-03 Thread Stefan Fritsch
On Sunday 02 September 2012, s...@sfritsch.de wrote: > But it may still be a problem the other way round. If adjtimedelta > would go to zero during the lost ticks, there will be some > over-compensation that is not detected. After some more hints from Mark (thanks), I think this is very unlikely

Re: Possible bug in timecounter code

2012-09-02 Thread sf
On Sun, 2 Sep 2012, Mark Kettenis wrote: On Sun, 2 Sep 2012, Mark Kettenis wrote: ntp_update_second() subtracts some amount of time from adjtimedelta and sets th->th_adjustment accordingly. However, if ntp_update_second is called more than once in a row, only the last value of th->th_adjustment

Re: Possible bug in timecounter code

2012-09-02 Thread Mark Kettenis
> Date: Sun, 2 Sep 2012 17:22:28 +0200 (CEST) > From: s...@sfritsch.de > > On Sun, 2 Sep 2012, Mark Kettenis wrote: > >> ntp_update_second() subtracts some amount of time from adjtimedelta and > >> sets th->th_adjustment accordingly. However, if ntp_update_second is > >> called more than once in a

Re: Possible bug in timecounter code

2012-09-02 Thread sf
On Sun, 2 Sep 2012, Mark Kettenis wrote: ntp_update_second() subtracts some amount of time from adjtimedelta and sets th->th_adjustment accordingly. However, if ntp_update_second is called more than once in a row, only the last value of th->th_adjustment is actually applied. Shouldn't the adjustm

Re: Possible bug in timecounter code

2012-09-02 Thread Mark Kettenis
> Date: Sun, 2 Sep 2012 13:18:03 +0200 (CEST) > From: Stefan Fritsch > > tc_windup() calls ntp_update_second() up to 200 times: > > > /* > > * A large step happens on boot. This constant detects such steps. > > * It is relatively small so that ntp_update_second gets called enough > > * in th

Possible bug in timecounter code

2012-09-02 Thread Stefan Fritsch
tc_windup() calls ntp_update_second() up to 200 times: /* * A large step happens on boot. This constant detects such steps. * It is relatively small so that ntp_update_second gets called enough * in the typical 'missed a couple of seconds' case, but doesn't loop * forever when the time step