lkml.org 
[lkml]   [2008]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] correct inconsistent ntp interval/tick_length usage
Hi,

On Wed, 23 Jan 2008, john stultz wrote:

> This difference in calculation was causing the clocksource correction
> code to apply a correction factor to the clocksource so the two
> intervals were the same, however this results in the actual frequency of
> the clocksource to be made incorrect. I believe this difference would
> affect all clocksources, although to differing degrees depending on the
> clocksource resolution.

Let's look at why the correction is done in first place. The update steps
don't add up precisely to 1sec (LATCH*HZ != CLOCK_TICK_RATE), so a small
addjustment is used to make up for it. The problem here is that if the
update frequency changes, the addjustment isn't correct anymore.
The simple fix is to just omit the addjustment in these cases in ntp.c:

#if NTP_INTERVAL_FREQ == HZ
...
#else
#define CLOCK_TICK_ADJUST 0
#endif

bye, Roman


\
 
 \ /
  Last update: 2008-01-25 15:11    [W:0.140 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site