mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: time: Improve documentation of timekeeeping_adjust()
Date: Sun, 30 Oct 2011 17:14:12 +0000	[thread overview]
Message-ID: <82mxcijtaz.fsf@gmail.com> (raw)
In-Reply-To: <1319785345.23224.75.camel@work-vm>

On Fri 28 Oct 2011, John Stultz wrote:

> On Fri, 2011-10-28 at 08:05 +0200, Richard Cochran wrote:
>> On Thu, Oct 27, 2011 at 06:12:42PM -0700, John Stultz wrote:
>> > diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
>> > index a5846a8..de8737e 100644
>> > --- a/kernel/time/timekeeping.c
>> > +++ b/kernel/time/timekeeping.c
>> > @@ -802,14 +802,44 @@ static void timekeeping_adjust(s64 offset)
>> >  	s64 error, interval = timekeeper.cycle_interval;
>> >  	int adj;
>> >  
>> > +	/*
>> > +	 * The point of this is to check if the error is greater then half
>> > +	 * an interval.
>> > +	 *
>> > +	 * First we shift it down from NTP_SHIFT to clocksource->shifted nsecs.
>> > +	 *
>> > +	 * Note we subtract one in the shift, so that error is really error*2.
>> > +	 * This "saves" dividing(shifting) intererval twice, but keeps the
>> > +	 * (error > interval) comparision as still measuring if error is
>> > +	 * larger then half an interval.
>> > +	 *
>> > +	 * Note: It does not "save" on aggrivation when reading the code.
>> 
>> ... or on "aggravation" either :)
>
> Sigh. I do need to start using an editor with built in spell checking.
> I'm so poor of a speller (and a typist) its really amazing its not
> worse.
>
> Thanks for catching that.
> -john

s/intererval/interval/

    AndyM


  reply	other threads:[~2011-10-30 18:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28  1:12 [PATCH] " John Stultz
2011-10-28  6:05 ` Richard Cochran
2011-10-28  7:02   ` John Stultz
2011-10-30 17:14     ` Andy Moreton [this message]
2011-10-28  6:57 ` Ingo Molnar
2011-11-18 23:04 ` [tip:timers/core] " tip-bot for John Stultz

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=82mxcijtaz.fsf@gmail.com \
    --to=andrewjmoreton@gmail.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

Powered by JetHome