From: David Schleef <ds@schleef.org>
To: Andre Hedrick <andre@linux-ide.org>
Cc: george anzinger <george@mvista.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
schwidefsky@de.ibm.com, linux-kernel@vger.kernel.org,
high-res-timers-discourse@lists.sourceforge.net
Subject: Re: Linux-Kernel Archive: No 100 HZ timer !
Date: Fri, 13 Apr 2001 02:05:15 -0700 [thread overview]
Message-ID: <20010413020514.A17919@stm.lbl.gov> (raw)
In-Reply-To: <3AD66B62.23620639@mvista.com> <Pine.LNX.4.10.10104122102170.4564-100000@master.linux-ide.org>
In-Reply-To: <Pine.LNX.4.10.10104122102170.4564-100000@master.linux-ide.org>; from andre@linux-ide.org on Thu, Apr 12, 2001 at 09:04:28PM -0700
On Thu, Apr 12, 2001 at 09:04:28PM -0700, Andre Hedrick wrote:
> On Thu, 12 Apr 2001, george anzinger wrote:
>
> > Actually we could do the same thing they did for errno, i.e.
> >
> > #define jiffies get_jiffies()
> > extern unsigned get_jiffies(void);
>
> > No, not really. HZ still defines the units of jiffies and most all the
> > timing is still related to it. Its just that interrupts are only "set
> > up" when a "real" time event is due.
>
> Great HZ always defines units of jiffies, but that is worthless if there
> is not a ruleset that tells me a value to divide by to return it to a
> specific quantity of time.
It makes more sense to start migrating drivers to macros such as
msec_to_jiffies(), msec_to_whatever_add_timer_wants(), etc. (Names
changed to protect the innocent.) And leave HZ approximately the
way it is, because that's what the code expects.
A good transition is for add_timer() to be defined as
#define add_timer(a) add_timer_ns(a*1000000000/HZ)
although this causes problems with timers over 4 seconds. As much
as I like nanoseconds, it's probably overkill here, since one should
be requesting absolute time if it's specified in nanoseconds.
dave...
next prev parent reply other threads:[~2001-04-13 9:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3AD622AB.5F0A061B@linux-ide.org>
2001-04-12 21:52 ` Andre Hedrick
2001-04-12 23:12 ` Alan Cox
2001-04-12 23:21 ` Andre Hedrick
2001-04-13 2:58 ` george anzinger
2001-04-13 4:04 ` Andre Hedrick
2001-04-13 7:21 ` Eric W. Biederman
2001-04-13 8:28 ` george anzinger
2001-04-13 12:20 ` Mark Salisbury
2001-04-13 12:55 ` Michael Raymond
2001-04-13 15:50 ` george anzinger
2001-04-13 9:05 ` David Schleef [this message]
2001-04-13 12:47 ` Alan Cox
2001-04-14 13:57 ` Rogier Wolff
2001-04-15 2:10 ` Roger Larsson
2001-04-15 7:22 ` george anzinger
2001-04-16 15:32 ` Pavel Machek
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=20010413020514.A17919@stm.lbl.gov \
--to=ds@schleef.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andre@linux-ide.org \
--cc=george@mvista.com \
--cc=high-res-timers-discourse@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.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
all inboxes | Powered by JetHome®