From: linux-os <linux-os@analogic.com>
To: Robert White <rwhite@casabyte.com>
Cc: "'john stultz'" <johnstul@us.ibm.com>,
"'Linux kernel'" <linux-kernel@vger.kernel.org>
Subject: RE: New Linux System time proposal
Date: Wed, 19 Jan 2005 08:56:00 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.61.0501190834340.10191@chaos.analogic.com> (raw)
In-Reply-To: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA2ZSI4XW+fk25FhAf9BqjtMKAAAAQAAAAo+V6scX9e0yTLGWCQJDW1QEAAAAA@casabyte.com>
On Tue, 18 Jan 2005, Robert White wrote:
> I thought it was not at all unusual to miss a jiffy here or there due
> to interrupt
> locking/latency; plus jiffies is expressed with respect to the value
> of HZ so you
> would need to do some deviding in there somewhere.
>
Makes no difference. The idea is that jiffies __never__ gets changed,
ever.
> Where HZ has been adjusted up, or on slower embedded boxes where
> interrupts could be
> blocked longer, you would lose time.
>
No difference. We should never touch the count in the master timer,
jiffies. Never, never, ever.
> Or are you not talking about real-word time?
>
That's what I said. When you need to read real-world time,
you read the sum of bootime, time_adj, and jiffies. The
time is read in the most natural dimension, not necessarily
microsconds, it could be micro-croak-farts, a number dimension
that results in the least number of lossy conversions.
Boot time is read from the RTC (or other hardware clock) upon
boot and never changed. Jiffies starts at 0 upon boot. Time_adj
starts at 0 upon boot, but once the system is up it gets adjusted
when the machine is set to some outside reference. This parameter
is the only element that is ever adjusted. This is the only
element that ever needs to be protected with a lock. It can
certainly be dynamically adjusted (like adjtime) as well, but
that's some other variables.
Currently, if you do:
extern void gettimeofday(void *); // Phony, yes
int main()
{
int foo[0x10];
for(;;)
gettimeofday(foo);
}
An ordinary user can slow the system time about 10 seconds per
hour doing this! I don't know if this qualifies as a DOS, but
it isn't "nice".
> Rob White,
> Casabyte, Inc.
>
Cheers,
Dick Johnson
Penguin : Linux version 2.6.10 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
prev parent reply other threads:[~2005-01-19 13:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-11 14:31 linux-os
2005-01-11 14:58 ` Jan Engelhardt
2005-01-11 20:09 ` john stultz
2005-01-11 20:58 ` linux-os
2005-01-18 22:21 ` Robert White
2005-01-19 13:56 ` linux-os [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=Pine.LNX.4.61.0501190834340.10191@chaos.analogic.com \
--to=linux-os@analogic.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rwhite@casabyte.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®