mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Andrew Morton <akpm@digeo.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Time precision, adjtime(x) vs. gettimeofday
Date: 08 Oct 2003 12:11:02 -0700	[thread overview]
Message-ID: <1065640261.1033.90.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <20031008112510.06ae1ebd.shemminger@osdl.org>

On Wed, 2003-10-08 at 11:25, Stephen Hemminger wrote:
> On Wed, 08 Oct 2003 15:32:31 +0200
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > 
> > That means that if, for example, adjtimex was called with a factor
> > that is trying to slow you down a bit, and you call gettimeofday
> > right before the end of a jiffy period, you may calculate an offset
> > based on the HW timer that is actually higher than what will be
> > really added to xtime on the next interrupt.
[snip]
> The following will prevent adjtime from causing time regression.
> It delays starting the adjtime mechanism for one tick, and 
> keeps gettimeofday inside the window.

Hmm. Looks good to me. If we're losing ticks, it would make time
stair-step somewhat, but it doesn't seem to affect the actual time
accumulation. 

thanks
-john




  parent reply	other threads:[~2003-10-08 19:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-08 13:32 Benjamin Herrenschmidt
2003-10-08 15:48 ` Gabriel Paubert
2003-10-08 16:22   ` Benjamin Herrenschmidt
2003-10-08 17:50     ` Gabriel Paubert
2003-10-08 18:22       ` Benjamin Herrenschmidt
2003-10-08 18:25 ` [PATCH] " Stephen Hemminger
2003-10-08 18:43   ` Benjamin Herrenschmidt
2003-10-08 19:11   ` john stultz [this message]
2003-10-08 22:17 ` Pavel Machek

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=1065640261.1033.90.camel@cog.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=akpm@digeo.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shemminger@osdl.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

all inboxes | Powered by JetHome®