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

Martin Schwidefsky
2009-08-03T08:02:17Z

On Fri, 31 Jul 2009 16:32:58 -0700
john stultz <johnstul@us.ibm.com> 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.