The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: john stultz <johnstul@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: Incorrect CLOCK_TICK_RATE in 2.6 kernel
Date: Wed, 24 Aug 2005 18:30:09 -0700	[thread overview]
Message-ID: <430D1F21.80401@mvista.com> (raw)
In-Reply-To: <1124930039.20820.123.camel@cog.beaverton.ibm.com>

john stultz wrote:
> On Wed, 2005-08-24 at 17:24 -0700, George Anzinger wrote:
> 
>>CLOCK_TICK_RATE	is used by the kernel to compute LATCH, TICK_NSEC and 
>>tick_nsec.  This latter is used to update xtime each tick.  TICK_NSEC is 
>>then used to compute (at compile time) the conversion constants needed 
>>to convert to/from jiffies from/to timespec and timeval (and others).
>>
>>The problem is that, if the timer being used is either Cyclone or HPET, 
>>the wrong CLOCK_TICK_RATE is used.
> 
> 
> Err, the Cyclone does not generate interrupts. So this issue does not
> affect those systems.
> 
> As for the HPET, it sets its own interrupt frequency based off of
> KERNEL_TICK_USEC (which you're right, isn't quite what is used in the
> jiffies conversions).  Would it be easier to just adjust that value to
> use ACTHZ or CLOCK_TICK_RATE?

If you want to take that approach you would want the HPET to interrupt 
every TICK_NSEC nanoseconds, that being what xtime is pushed by each tick.

-- 
George Anzinger   george@mvista.com
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/

      reply	other threads:[~2005-08-25  1:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-25  0:24 Incorrect CLOCK_TICK_RATE in 2.6 kernel George Anzinger
2005-08-25  0:33 ` john stultz
2005-08-25  1:30   ` George Anzinger [this message]

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=430D1F21.80401@mvista.com \
    --to=george@mvista.com \
    --cc=johnstul@us.ibm.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