From: Andi Kleen <ak@suse.de>
To: linux-ia64@vger.kernel.org
Subject: Re: sched_clock
Date: Fri, 04 Jun 2004 11:02:34 +0000 [thread overview]
Message-ID: <20040604110234.GF28362@wotan.suse.de> (raw)
In-Reply-To: <40B4868F.B649611C@nospam.org>
On Fri, Jun 04, 2004 at 05:43:08AM -0400, Ingo Molnar wrote:
>
> On Thu, 3 Jun 2004, David Mosberger wrote:
>
> > Ingo, is there something on x86 that guarantees that the cycle-counter
> > will start out near zero at boot time?
>
> it starts at zero, but there's no guarantee as far as i know. Would there
> be any reason for it to start at another reason?
Software can change it using MSR 1. One reason might be that the easiest way
to synchronize them for multiple CPUs at boot time is to set it to
a high future value. But I don't know of any BIOS that does that.
At one point we considered doing it ourselves on x86-64 to store the
CPU number in the high bits for fast and race free per CPU gettimefoday.
But so far this hasn't been done. This won't work on i386 because
older Intel CPUs don't allow to write the full 64bits.
BTW I had code relying on the TSC not wrapping in the x86-64 kernel
for some time (now fixed), but nothing bad has happened.
-Andi
next prev parent reply other threads:[~2004-06-04 11:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-26 11:59 sched_clock Zoltan Menyhart
2004-06-03 22:46 ` sched_clock David Mosberger
2004-06-04 9:43 ` sched_clock Ingo Molnar
2004-06-04 11:02 ` Andi Kleen [this message]
2004-06-04 11:11 ` sched_clock Zoltan Menyhart
2004-06-04 22:23 ` sched_clock David Mosberger
2004-06-04 22:52 ` sched_clock David Mosberger
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=20040604110234.GF28362@wotan.suse.de \
--to=ak@suse.de \
--cc=linux-ia64@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