public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: jim.houston@attbi.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: LTP - gettimeofday02 FAIL
Date: 19 Nov 2002 13:03:48 +0100	[thread overview]
Message-ID: <m3bs4l7om3.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <200211190127.gAJ1RWg11023@linux.local>

Jim Houston <jim.houston@attbi.com> writes:

> I believe that this is the result of lost ticks.  It has gotten much
> easier to lose a tick since HZ was changed to 1000.  When the timer
> interrupt is delayed, the other processors will continue to keep reasonable
> time (based on the TSC), but when the timer interrupt eventually happens,
> it will add one tick's worth of nanoseconds to xtime.tv_nsec and set
> last_tsc_low to the current tsc value.  The other processors now base
> their time on this new last_tsc_low and  will see time go backwards.

It could be detected by keeping a per cpu last_tsc.

Best would be to use a global timer like HPET, but it's not available
everywhere and much slower than rdtsc too.

-Andi

  reply	other threads:[~2002-11-19 11:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-19  1:27 LTP - gettimeofday02 FAIL Jim Houston
2002-11-19 12:03 ` Andi Kleen [this message]
2002-11-19 13:37 ` [LTP] " Paul Larson
2002-11-19 14:02   ` Dave Jones
2002-11-19 14:50     ` Paul Larson
  -- strict thread matches above, loose matches on Subject: below --
2002-11-12 22:11 Paul Larson
2002-11-14 21:52 ` Chris Wedgwood
2002-11-18 17:34   ` Paul Larson
2002-11-18 21:58     ` Chris Wedgwood

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=m3bs4l7om3.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=jim.houston@attbi.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