mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
Cc: Jack Harvard <jack.harvard@googlemail.com>, linux-kernel@vger.kernel.org
Subject: Re: gettimeofday() resolution in Linux?
Date: Thu, 10 Apr 2008 17:35:25 +0200	[thread overview]
Message-ID: <87fxttn2o2.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20080410150424.GD2160@csclub.uwaterloo.ca> (Lennart Sorensen's message of "Thu, 10 Apr 2008 11:04:24 -0400")

lsorense@csclub.uwaterloo.ca (Lennart Sorensen) writes:
>
> On many systems gettimeofday uses the TSC, but on many multicore systems
> the TSC on each core may be out of sync, in which case the cpu you are
> running on may give a different gettimeofday result than another cpu,
> which is probably a bad thing for some processes.

In this case Linux falls back to other timers which are slower and 
less accurate.

jiffies based gettimeofday is theoretically possible, but near
never used.

-Andi

  reply	other threads:[~2008-04-10 15:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10 14:40 Jack Harvard
2008-04-10 15:04 ` Lennart Sorensen
2008-04-10 15:35   ` Andi Kleen [this message]
2008-04-10 15:59   ` Jack Harvard
2008-04-10 17:41     ` Bart Van Assche
     [not found]       ` <a72f6a3c0804101057i10c572bak1dd09f0c7fd75d30@mail.gmail.com>
2008-04-10 18:02         ` Bart Van Assche
2008-04-10 15:49 ` Chris Friesen
2008-04-10 16:07 ` Bart Van Assche

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=87fxttn2o2.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=jack.harvard@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsorense@csclub.uwaterloo.ca \
    /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®