From: Albert Cahalan <albert@users.sf.net>
To: john stultz <johnstul@us.ibm.com>
Cc: Albert Cahalan <albert@users.sourceforge.net>,
Andrew Morton OSDL <akpm@osdl.org>,
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
linux-kernel mailing list <linux-kernel@vger.kernel.org>,
voland@dmz.com.pl, nicolas.george@ens.fr,
kaukasoi@elektroni.ee.tut.fi, tim@physik3.uni-rostock.de,
george anzinger <george@mvista.com>,
david+powerix@blue-labs.org
Subject: Re: boot time, process start time, and NOW time
Date: 17 Aug 2004 13:41:02 -0400 [thread overview]
Message-ID: <1092764462.5761.1553.camel@cube> (raw)
In-Reply-To: <1092769231.2429.115.camel@cog.beaverton.ibm.com>
On Tue, 2004-08-17 at 15:00, john stultz wrote:
> On Mon, 2004-08-16 at 16:24, Albert Cahalan wrote:
> > On Mon, 2004-08-16 at 15:41, Andrew Morton wrote:
> >
> > > Where did this all end up? Complaints about
> > > wandering start times are persistent, and it'd
> > > be nice to get some fix in place...
> >
> > If you're interested in reducing (not solving)
> > the problem for the 2.6.x series, you might change
> > HZ to something that works better with the PIT.
> >
> > Here is a table showing % error for various HZ choices:
> >
> > wrongness_% HZ_diff PIT_# HZ actual_HZ
> > -0.00150855 -0.001509 11932 100 99.998491
> > -0.00150855 -0.009474 1900 628 627.990526
> > -0.00083809 -0.003051 3278 364 363.996949
> > -0.00083809 -0.008389 1192 1001 1000.991611
> > +0.00000000 +0.000000 14551 82 82.000000
> > +0.00008381 +0.000304 3287 363 363.000304
> > +0.00008381 +0.000435 2299 519 519.000435
> > +0.00008381 +0.000525 1903 627 627.000525
> > +0.01525566 +0.152557 1193 1000 1000.152557
> > +0.01860917 +0.190558 1165 1024 1024.190558
> >
> > As you can see, 1000 HZ and 1024 HZ are really bad.
> > They're worse than typical quartz crystal variation.
> >
> > The old 100 HZ tick was just barely tolerable.
> > While 82 is perfect, it's a bit low. :-(
> >
> > Some of the other choices are nice. How about 363,
> > 519, or 627?
>
> What about 1001? That looks reasonably accurate.
Sure. (it's 10x worse, but the crystals aren't good
enough to tell the difference) Supposing that a
choice near 1000 HZ is good, here are some more:
wrongness_% HZ_diff PIT_# HZ actual_HZ
-0.00217900 -0.021703 1198 996 995.978297
-0.00083809 -0.008389 1192 1001 1000.991611
-0.00050285 -0.006376 941 1268 1267.993624
+0.00050286 +0.005396 1112 1073 1073.005396
+0.00150859 +0.014950 1204 991 991.014950
I think it's better to drop down a bit, because people
have also been suffering problems with lost ticks.
The BIOS can grab the CPU for too long.
We need to deal well with a few different frequencies:
100 the old clock tick
59.94 NTSC field rate
50 PAL field rate
The theory is that you need a frequency of just over 2x
the one you'd like, but in practice you need about 4x.
So that's why I suggested 363, 519, and 627.
I'd really rather just run everything off the RTC or HPET,
with an arbitrary rate interrupt source, and just call into
the regular jiffies handling code as needed to catch up.
This would allow steering the jiffies tick to an exact
integer HZ. High-precision timers could be fired off of
the RTC or HPET interrupt if that is running faster.
next prev parent reply other threads:[~2004-08-17 20:14 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-22 23:57 boot time, process start time, and NOW time Albert Cahalan
2004-06-28 17:56 ` OGAWA Hirofumi
2004-08-16 19:41 ` Andrew Morton
2004-08-16 21:49 ` john stultz
2004-08-16 23:08 ` Tim Schmielau
2004-08-16 23:56 ` Tim Schmielau
2004-08-17 0:21 ` john stultz
2004-08-17 0:37 ` George Anzinger
2004-08-17 0:49 ` john stultz
2004-08-17 0:31 ` George Anzinger
2004-08-16 22:32 ` Albert Cahalan
2004-08-17 1:26 ` George Anzinger
2004-08-16 23:08 ` Albert Cahalan
2004-08-17 1:54 ` James Courtier-Dutton
2004-08-17 2:03 ` Lee Revell
2004-08-17 20:52 ` George Anzinger
2004-08-17 6:56 ` Tim Schmielau
2004-08-17 20:07 ` john stultz
2004-08-17 20:13 ` [RFC] New timeofday implementation proposal john stultz
2004-08-17 20:58 ` [RFC] New timeofday code john stultz
2004-09-01 23:16 ` [RFC] New timeofday implementation proposal Christoph Lameter
2004-08-16 23:24 ` boot time, process start time, and NOW time Albert Cahalan
2004-08-17 19:00 ` john stultz
2004-08-17 17:41 ` Albert Cahalan [this message]
2004-08-17 20:58 ` john stultz
2004-08-17 20:25 ` [PATCH] " Tim Schmielau
2004-08-17 22:24 ` George Anzinger
2004-08-17 22:37 ` john stultz
2004-08-17 23:07 ` Tim Schmielau
2004-08-18 0:11 ` john stultz
2004-08-17 22:19 ` Albert Cahalan
2004-08-18 1:09 ` john stultz
2004-08-17 22:45 ` Albert Cahalan
2004-08-18 7:42 ` Tim Schmielau
2004-08-19 19:15 ` Petri Kaukasoina
2004-08-26 11:04 ` Andrew Morton
2004-08-26 12:07 ` Tim Schmielau
2004-08-30 23:00 ` Tim Schmielau
2004-08-30 23:38 ` john stultz
2004-08-31 0:37 ` Albert Cahalan
2004-08-31 0:49 ` Tim Schmielau
2004-08-31 0:45 ` Tim Schmielau
2004-08-31 1:23 ` john stultz
2004-08-31 1:34 ` john stultz
2004-08-31 6:07 ` Tim Schmielau
2004-08-31 19:27 ` George Anzinger
2004-08-31 20:56 ` john stultz
2004-08-31 21:10 ` David Ford
2004-09-02 20:39 ` George Anzinger
2004-09-01 19:14 ` OGAWA Hirofumi
2004-09-02 20:58 ` George Anzinger
2004-09-02 21:38 ` OGAWA Hirofumi
2004-09-03 0:59 ` George Anzinger
2004-09-03 3:35 ` OGAWA Hirofumi
2004-09-03 7:31 ` George Anzinger
2004-09-03 7:51 ` Tim Schmielau
2004-09-03 7:15 ` Tim Schmielau
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=1092764462.5761.1553.camel@cube \
--to=albert@users.sf.net \
--cc=akpm@osdl.org \
--cc=albert@users.sourceforge.net \
--cc=david+powerix@blue-labs.org \
--cc=george@mvista.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=johnstul@us.ibm.com \
--cc=kaukasoi@elektroni.ee.tut.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.george@ens.fr \
--cc=tim@physik3.uni-rostock.de \
--cc=voland@dmz.com.pl \
/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