From: John Stultz <john.stultz@linaro.org>
To: Richard Cochran <richardcochran@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Chen Jie <chenj@lemote.com>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] time: Improve documentation of timekeeeping_adjust()
Date: Fri, 28 Oct 2011 00:02:25 -0700 [thread overview]
Message-ID: <1319785345.23224.75.camel@work-vm> (raw)
In-Reply-To: <20111028060534.GB1957@netboy.at.omicron.at>
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
next prev parent reply other threads:[~2011-10-28 7:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 1:12 [PATCH] time: Improve documentation of timekeeeping_adjust() John Stultz
2011-10-28 6:05 ` Richard Cochran
2011-10-28 7:02 ` John Stultz [this message]
2011-10-30 17:14 ` Andy Moreton
2011-10-28 6:57 ` [PATCH] " 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=1319785345.23224.75.camel@work-vm \
--to=john.stultz@linaro.org \
--cc=chenj@lemote.com \
--cc=linux-kernel@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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