linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: john stultz <johnstul@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/10] NTP: add ntp_update_frequency
Date: Thu, 12 Jan 2006 13:28:42 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.61.0601121324510.30994@scrub.home> (raw)
In-Reply-To: <1137020731.2890.74.camel@cog.beaverton.ibm.com>

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

      parent reply	other threads:[~2006-01-12 12:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-21 23:21 [PATCH 3/10] NTP: add ntp_update_frequency Roman Zippel
2006-01-11 23:05 ` john stultz
2006-01-11 23:08   ` john stultz
2006-01-12 12:28   ` Roman Zippel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0601121324510.30994@scrub.home \
    --to=zippel@linux-m68k.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).