From: george anzinger <george@mvista.com>
To: Mark Salisbury <gonar@mediaone.net>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Andre Hedrick <andre@linux-ide.org>,
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 08:50:32 -0700 [thread overview]
Message-ID: <3AD72048.23CAE80A@mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10104122102170.4564-100000@master.linux-ide.org> <m1snjdtgcc.fsf@frodo.biederman.org> <3AD6B894.39848F3F@mvista.com> <002d01c0c414$346b2140$6501a8c0@gonar.com>
Mark Salisbury wrote:
>
> > I think it makes the most sense to keep jiffie as a simple unsigned
> > int. If we leave drivers, and other code as is they can deal with
> > single word (32 bit) values and get reasonable results. If we make HZ
> > too high (say 10,000 to get micro second resolution) we will start
> > limiting the max time we can handle, in this case to about 71.5 hours.
> > (Actually 1/2 this value would start giving us trouble.) HZ only
> > affects the kernel internals (the user API is either seconds/micro
> > seconds or seconds/nano seconds). For those cases where we want a higer
> > resolution we just add a sub jiffie component. Another way of looking
> > at this is to set up HZ as the "normal" resolution. This would be the
> > resolution (as it is today) of the usual API calls. Only calls to the
> > POSIX 1b timers would be allowed to have higher resolution. I propose
> > that we use the POSIX standard to define "CLOCKS" with various
> > resolution, with the understanding that the higher resolutions will have
> > higher overhead. An yet another consideration, to get high resolution
> > with a reasonable maximum timer interval we will need to use two words
> > in the timer. I think it makes sense to use the jiffie (i.e. 1/HZ) as
> > the high order part of the timer's time.
> >
> > Note that all of these considerations on jiffie size hold with or with
> > out a tick less system.
>
> inner loop, i.e. interrupt timer code should never have to convert from some
> real time value into number of decrementer ticks in order to set up the next
> interrupt as that requires devides (and 64 bit ones at that) in a tickless
> system.
A good point! If we keep jiffies and sub jiffies in the timer
structure, then the sub jiffies should be in hardware defined units
(i.e. what we need to directly talk to the hardware). This argues for
the jiffie to be longer than the longest expected inter event interval,
i.e. for it to be larger than 10 ms. Seconds and sub seconds? At least
this eliminates the mpy from the high order part.
I think we need to balance the units used in the time list with the
needs of the list management code. It may not be a good idea to tie it
too tightly to the jiffie. Thinking aloud here...
Another though, if we keep a small conversion table to convert from
jiffies to machine units for say the first 10 jiffies, then force an
"non event" timer interrupt if needed. This would, I guess, get us back
to a tick system, but with tick every 10 jiffies... Still thinking...
George
>
> this is why any variable interval list/heap/tree/whatever should be kept in
> local ticks. frequently used values can be pre-computed at boot time to
> speed up certain calculations (like how many local ticks/proc quantum)
next prev parent reply other threads:[~2001-04-13 15:53 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 ` Linux-Kernel Archive: No 100 HZ timer ! 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 [this message]
2001-04-13 9:05 ` David Schleef
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=3AD72048.23CAE80A@mvista.com \
--to=george@mvista.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andre@linux-ide.org \
--cc=ebiederm@xmission.com \
--cc=gonar@mediaone.net \
--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