linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Iain Sandoe" <iain@sandoe.co.uk>
To: "Joseph P. Garcia" <jpgarcia@execpc.com>, Steve Poole <sp@is2-isnot.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Timing Facilities
Date: Thu, 22 Feb 2001 08:59:48 +0000	[thread overview]
Message-ID: <20010222085859.0271CDB9E0@atlas.valhalla.net> (raw)


Thu, Feb 22, 2001,Joseph P. Garcia wrote:
> On Wed, 21 Feb 2001 23:24:57 -0600, Steve Poole <sp@is2-isnot.com> wrote:
>> I have written a small assembly fragment to read the TB register that runs
>> under Linux (YDL/BLL). What is the definition of a "tick" or "jiffie" under
>> Linux. When some code is run under MacOS (400MHz G4) the results are
>> *faster* (the numbers returned are lower) than when I run on a 500MHz G4. I
>> appreciate any input.
>
> I beleive there are 1*HZ jiffies in one second.  Used in the kernel's
> timer_list struct (to name one use), which basically has the kernel run a
> function at a specific time.  ex, setting the 'expires' value to (jiffies +
> HZ) will cause it to run one second from now.

the VEA TB rate is not fixed to the processor clock - but is related to the
bus freq (IIRC).  You can find the TB rate from OF (but beware of a report
that says the values stored are not always correct).

I did a similar thing a while ago - and, because high precision was not
required, just used gettime() and a few seconds sleep... to calibrate.

ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2001-02-22  8:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-22  8:59 Iain Sandoe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-02-22  5:24 Timing Facilities Steve Poole
2001-02-22  6:10 ` Joseph P. Garcia

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=20010222085859.0271CDB9E0@atlas.valhalla.net \
    --to=iain@sandoe.co.uk \
    --cc=jpgarcia@execpc.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=sp@is2-isnot.com \
    /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;
as well as URLs for NNTP newsgroup(s).