From: mbs <mbs@mc.com>
To: Linus Torvalds <torvalds@transmeta.com>, Robert Love <rml@tech9.net>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: HZ, preferably as small as possible
Date: Mon, 15 Jul 2002 15:52:37 -0400 [thread overview]
Message-ID: <200207151950.PAA11566@mc.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0207151151200.19586-100000@penguin.transmeta.com>
On Monday 15 July 2002 14:56, Linus Torvalds wrote:
> On 15 Jul 2002, Robert Love wrote:
> > A cleaner solution to this issue is a higher resolution timer, e.g. the
> > high-res-timers project which has high resolution POSIX timers.
>
> But that really doesn't solve the problem either.
>
> You still need to have some limit on the timer resolution. Whether you
> call that limit "HZ" or something else is irrelevant in the end. Just
> calling them "high-resolution" doesn't make the problem go away, you still
> have some resolution (*).
>
> So once you set some magic limit on the fine-grained resolution (let's
> call that "MAX_FINE_HZ"), you might as well realize that that really is
> 100% equivalent to just making HZ _be_ that value. Together with possibly
> making the actual timer tick happen at a slower rate according to some
> other heuristics (ie "the system doesn't need timers right now, let's just
> not do them").
>
> Linus
>
> (*) Which is a lot less than the hw can generate, since you mustn't allow
> users to bog down the system in timer interrupts by just using
> "itimer(ITIMER_REAL, .. fine-resolution..)".
actually, that is an interesting philosophical argument.
in an embedded system, it is sometimes more useful to not put artificial
constraints on the system and allow the clock and timer system to work in hw
increments, but document the hell out of it.
this is the "give 'em enough rope to hang themselves, but tell them the
precise length of the rope" model.
in an embedded system a "tickless" system is sometimes preferable to a ticked
system. there is often only one or a very small number of processes/threads
running and the extra overhead of 10 surplus clock ticks per process quantum
is a waste of cycles. (also when using a ppc or similar modern chip(flame
on;-), there is no need to keep a software wall clock, as the cpu has a 64bit
free running counter)
I had this discussion with george A. early in the posix timers project and I
argued/begged for a compile time config option giving the option of ticked
and tickless versions. George chose to go with a ticked system, because it
benchmarked better in a general purpose system, particlularly under high
loads, and he didn't have time to implement two systems. he made the right
choice for the general purpose kernel and for probably 80% of the embedded
market. (I'm in the other 20%)
--
/**************************************************
** Mark Salisbury || mbs@mc.com **
**************************************************/
next prev parent reply other threads:[~2002-07-15 19:47 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-10 19:59 HZ, preferably as small as possible Grover, Andrew
2002-07-10 21:09 ` george anzinger
2002-07-11 6:03 ` Hannu Savolainen
2002-07-11 7:15 ` george anzinger
2002-07-12 0:36 ` Stevie O
2002-07-12 0:50 ` Thunder from the hill
2002-07-12 0:55 ` Robert Love
2002-07-12 0:58 ` Thunder from the hill
2002-07-12 1:24 ` Alan Cox
2002-07-12 1:37 ` Mark Hahn
2002-07-12 1:09 ` george anzinger
2002-07-12 1:26 ` Roland Dreier
2002-07-12 17:30 ` george anzinger
2002-07-12 1:35 ` Stevie O
2002-07-12 3:01 ` Bernd Eckenfels
2002-07-11 12:54 ` Thunder from the hill
2002-07-11 15:59 ` Martin Dalecki
2002-07-10 21:28 ` Andrew Morton
2002-07-10 21:35 ` Benjamin LaHaise
2002-07-10 21:38 ` Andrew Morton
2002-07-10 21:42 ` Benjamin LaHaise
2002-07-11 2:14 ` CaT
2002-07-11 17:01 ` Martin Dalecki
2002-07-10 22:01 ` Thunder from the hill
2002-07-10 22:09 ` Cort Dougan
2002-07-11 13:36 ` Whoa... (was: Re: HZ, preferably as small as possible) Mark Mielke
2002-07-11 21:08 ` Daniel Phillips
2002-07-10 22:41 ` HZ, preferably as small as possible Thunder from the hill
2002-07-10 22:47 ` Thunder from the hill
2002-07-10 22:49 ` Eli Carter
2002-07-10 23:05 ` Thunder from the hill
2002-07-10 23:08 ` Dave Mielke
2002-07-10 23:13 ` Thunder from the hill
2002-07-10 23:50 ` J.A. Magallon
2002-07-11 0:28 ` Lincoln Dale
2002-07-11 11:35 ` Kasper Dupont
2002-07-11 12:30 ` Alan Cox
2002-07-11 13:37 ` Kasper Dupont
2002-07-11 15:46 ` Alan Cox
2002-07-11 18:51 ` george anzinger
2002-07-15 5:06 ` Linus Torvalds
2002-07-15 16:26 ` Robert Love
2002-07-15 18:56 ` Linus Torvalds
2002-07-15 19:52 ` mbs [this message]
2002-07-15 20:01 ` yodaiken
2002-07-16 11:41 ` Vojtech Pavlik
2002-07-17 19:33 ` Daniel Phillips
2002-07-17 20:31 ` Richard B. Johnson
2002-07-17 20:40 ` Daniel Phillips
2002-07-17 21:02 ` Richard B. Johnson
2002-07-17 21:02 ` Linus Torvalds
2002-07-17 21:16 ` Daniel Phillips
2002-07-18 12:57 ` Richard B. Johnson
2002-07-18 13:25 ` Daniel Phillips
2002-07-18 10:10 ` Kai Henningsen
2002-07-17 20:55 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2002-07-11 2:46 Grover, Andrew
2002-07-11 3:01 ` Jeff Garzik
2002-07-11 11:45 ` Alan Cox
2002-07-11 17:08 ` Martin Dalecki
2002-07-11 19:21 ` Albert D. Cahalan
2002-07-16 9:17 ` Kai Henningsen
2002-07-11 20:34 ` Bill Davidsen
2002-07-12 12:01 ` Martin Dalecki
2002-07-15 5:15 ` Linus Torvalds
2002-07-15 6:56 ` Albert D. Cahalan
2002-07-15 8:24 ` Russell King
2002-07-15 15:48 ` David Mosberger
2002-07-15 18:20 ` Albert D. Cahalan
2002-07-15 18:30 ` David Mosberger
2002-07-15 16:07 ` Albert D. Cahalan
2002-07-15 17:06 ` Russell King
2002-07-15 18:43 ` Albert D. Cahalan
2002-07-15 18:53 ` Russell King
2002-07-15 18:50 ` Linus Torvalds
2002-07-15 20:15 ` Albert D. Cahalan
2002-07-15 8:58 ` Dave Mielke
2002-07-11 7:09 ` george anzinger
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=200207151950.PAA11566@mc.com \
--to=mbs@mc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@tech9.net \
--cc=torvalds@transmeta.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