mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: davidm@hpl.hp.com
Cc: john stultz <johnstul@us.ibm.com>,
	george anzinger <george@mvista.com>,
	lkml <linux-kernel@vger.kernel.org>,
	ia64 <linux-ia64@vger.kernel.org>
Subject: Re: gettimeofday nanoseconds patch (makes it possible for the posix-timer functions to return higher accuracy)
Date: Thu, 15 Jul 2004 08:31:06 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0407150810290.21314@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <16629.56037.120532.779793@napali.hpl.hp.com>

On Wed, 14 Jul 2004, David Mosberger wrote:

> >>>>> On Wed, 14 Jul 2004 17:48:06 -0700, john stultz <johnstul@us.ibm.com> said:
>
>   John> Although you still have the issue w/ NTP adjustments being
>   John> ignored, but last time I looked at the time_interpolator code,
>   John> it seemed it was being ignored there too, so at least your not
>   John> doing worse then the ia64 do_gettimeofday(). [If I'm doing the
>   John> time_interpolator code a great injustice with the above,
>   John> someone please correct me]
>
> The existing time-interpolator code for ia64 never lets time go
> backwards (in the absence of a settimeofday(), of course).  There is
> no need to special-case NTP.
>
> With Christoph's changes, NTP is an issue again, however.

The new code gains scalability and speed by avoiding the cmpxchg in the
old code. No check is done anymore that the resulting offset is really
later than the last time returned. In order to insure monotonic time the
underlying clock used must also be monotonic. The new code cannot handle
fluctuating time sources like unsynchronized ITCs. If the time source is
fluctuating then a function may be defined to be the source of time. This
function may do a compare to the last value returned in order to insure
that the clock stays monotonic and does not go backward. Doing so may slow
things down to the way they were before.

The old code only insured that the interpolated offset in nanoseconds
after a timer tick never goes backward. Negative corrections to xtime
could also result in time going backward since the offset is
always added to xtime. Both the old and the new code use the logic in
time_interpolator_update (invoked when xtime is advanced) to compensate
for this situation.

  parent reply	other threads:[~2004-07-15 15:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-14 16:41 Christoph Lameter
2004-07-14 20:09 ` john stultz
2004-07-14 20:28   ` Christoph Lameter
2004-07-14 21:14     ` David Mosberger
2004-07-14 21:15     ` john stultz
2004-07-15  0:08       ` Christoph Lameter
2004-07-15  0:48         ` john stultz
2004-07-15  1:16           ` David Mosberger
2004-07-15  1:35             ` john stultz
2004-07-15  3:57               ` David Mosberger
2004-07-15 15:31             ` Christoph Lameter [this message]
2004-07-15 16:14               ` john stultz
2004-07-15 17:03                 ` Christoph Lameter
2004-07-15 17:18                   ` john stultz
2004-07-15 22:59   ` George Anzinger
2004-07-16  2:44     ` Christoph Lameter
2004-07-14 21:09 ` Matthew Wilcox
2004-07-14 21:27   ` Christoph Lameter

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.58.0407150810290.21314@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=davidm@hpl.hp.com \
    --cc=george@mvista.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-ia64@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®