Re: [PATCH 3/10] NTP: add ntp_update_frequency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 11 Jan 2006, john stultz wrote:

> > This introduces ntp_update_frequency and deinlines ntp_clear() (as it's
> > not performance critical).
> > It also changes how tick_nsec is calculated from tick_usec, instead of
> > scaling it using TICK_USEC_TO_NSEC it's simply shifted by the difference.
> > Since ntp doesn't change the tick value, the result in practice is the
> > same, but it's easier to change this into a clock parameter, which can
> > be calculated during boot.
> > 
> 
> One last thing, shouldn't this patch kill TICK_USEC_TO_NSEC ?

If it's the only user it could be removed, but jiffies.h can still be 
cleaned up in a separate pass.

> > @@ -334,10 +334,11 @@ int do_adjtimex(struct timex *txc)
> >  		    time_freq = max(time_freq, -time_tolerance);
> >  		} /* STA_PLL */
> >  	    } /* txc->modes & ADJ_OFFSET */
> > -	    if (txc->modes & ADJ_TICK) {
> > +	    if (txc->modes & ADJ_TICK)
> >  		tick_usec = txc->tick;
> > -		tick_nsec = TICK_USEC_TO_NSEC(tick_usec);
> > -	    }
> > +
> > +	    if (txc->modes & ADJ_TICK)
> > +		    ntp_update_frequency();
> 
> Why the extra conditional instead of just adding ntp_update_frequency()
> inside the braces?

This changes in the next patch. :)

> > +void ntp_update_frequency(void)
> > +{
> > +	tick_nsec = tick_usec * 1000;
> > +	tick_nsec -= NSEC_PER_SEC / HZ - TICK_NSEC;
> > +}
> 
> Could you add another "john is slow and forgetful" comment here?

Ok.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux