Re: [RFC][patch 10/12] move NTP adjusted clock multiplier to structtimekeeper

From: Martin Schwidefsky
Date: Mon Aug 03 2009 - 04:02:26 EST


On Fri, 31 Jul 2009 16:32:58 -0700
john stultz <johnstul@xxxxxxxxxx> wrote:

> On Fri, 2009-07-31 at 11:00 +0200, Martin Schwidefsky wrote:
> > How about this definition for struct timekeeper?
> >
> > /* Structure holding internal timekeeping values. */
> > struct timekeeper {
> > /* Current clocksource used for timekeeping. */
> > struct clocksource *clock;
> > /* The shift value of the current clocksource. */
> > int shift;
> >
> > /* Number of clock cycles in one NTP interval. */
> > cycle_t cycle_interval;
> > /* Number of clock shifted nano seconds in one NTP interval. */
> > u64 xtime_interval;
> > /* Raw nano seconds accumulated per NTP interval. */
>
> I might just use the term "accumulation interval" instead of NTP
> interval. This isn't something that's strictly connected to NTP, other
> then they both just need to have some chunk of time that we use as an
> comparative interval.

Acuumulation interval is more generic but it IS the NTP interval, no?
Do we plan to ever use something different than the NTP interval?

> > u32 raw_interval;
> >
> > /* Clock shifted nano seconds remainder not stored in xtime.tv_nsec. */
> > u64 xtime_nsec;
> > /* Difference between accumulated time and NTP time in ntp
> > * shifted nano seconds. */
> > s64 ntp_error;
> > /* Shift conversion between clock shifted nano seconds and
> > * ntp shifted nano seconds. */
> > int ntp_error_shift;
> > /* NTP adjusted clock multiplier */
> > u32 mult;
> > };
>
> Other then that it looks good to me!

Ok, I'll update the patches.

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/