From: Ralf Baechle <ralf@linux-mips.org>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>,
linux-mips@linux-mips.org
Subject: Re: [patch] Generic time fixes
Date: Tue, 22 Jul 2003 12:04:44 +0200 [thread overview]
Message-ID: <20030722100444.GA4148@linux-mips.org> (raw)
In-Reply-To: <Pine.GSO.3.96.1030722093500.607A-100000@delta.ds2.pg.gda.pl>
On Tue, Jul 22, 2003 at 09:58:46AM +0200, Maciej W. Rozycki wrote:
> Before I proceed further I need to get an aswer to the following
> question: why do we use rtc_set_time() for NTP RTC updates instead of
> rtc_set_mmss() like most other architectures do? Traditionally Linux only
> updated minutes and seconds in this context and I don't think we need to
> do anything more. And setting minutes and seconds only is way, way
> faster. Which might not matter that much every 11 minutes, except doing
> things slowly here incurs a disruption in the latency of the timer
> interrupt, which NTP might not like and the slow calculation of the RTC
> time causes less precise time being stored in the RTC chip.
>
> It's already questionable whether the update should be done at all (this
> was discussed zillion of times at the NTP group) and it disrupts
> timekeeping of the DECstation severely, but given the current choice, I'd
> prefer to make it as lightweight as possible.
It's a common case to have a system boot up with the RTC date being
completly off, then syncing via ntpdate and xntp to the accurate time.
If in that situation we only update the time the RTC will stay way far
from reality. Another case would be updates of the time near midnight
where the RTC and NTP date happen to just differ.
I share your dislike of updating the RTC for performance reasons; these
chips are impressive performance pigs. So how about updating the RTC
date only when
- write the time to the RTC for the first time after NTP synchronizes
- write the time to the RTC if xtime.tv_sec <= last_rtc_update + 660
?
> 3. local_timer_interrupt() is called with arguments passed from the above
> instead of fake ones (although "irq" and "dev_id" could be completely
> removed here; in the next iteration, I suppose).
Agreed. I can't imagine any use for dev_id in the timer interrupt and
the interrupt number seems only marginally more useful.
> 5. Leap years are handled properly.
Good thing. People at times do run their systems with clocks set wrongly,
even intensionally. So I blame (year % 4) == 0 for being a too trivial
view of the world.
> 6. Missing "extern" qualifiers for function declarations are added.
>
> OK to apply?
Yes.
Ralf
next prev parent reply other threads:[~2003-07-22 10:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-22 7:58 [patch] Generic time fixes Maciej W. Rozycki
2003-07-22 8:32 ` Jan-Benedict Glaw
2003-07-22 10:04 ` Ralf Baechle [this message]
2003-07-22 10:21 ` Wolfgang Denk
2003-07-22 11:21 ` Ralf Baechle
2003-07-22 20:54 ` Maciej W. Rozycki
2003-07-22 17:16 ` Jun Sun
2003-07-22 21:24 ` Maciej W. Rozycki
2003-07-22 20:38 ` Maciej W. Rozycki
2003-07-22 17:10 ` Jun Sun
2003-07-22 21:21 ` Maciej W. Rozycki
2003-07-22 22:37 ` Ralf Baechle
2003-07-22 22:55 ` Maciej W. Rozycki
2003-07-22 22:43 ` Jun Sun
2003-07-22 23:10 ` Maciej W. Rozycki
2003-07-22 23:37 ` Jun Sun
2003-07-23 0:30 ` Maciej W. Rozycki
2003-07-23 1:14 ` Jun Sun
2003-07-23 14:52 ` Maciej W. Rozycki
2003-07-23 17:00 ` Jun Sun
2003-07-24 11:13 ` Maciej W. Rozycki
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=20030722100444.GA4148@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=ica2_ts@csv.ica.uni-stuttgart.de \
--cc=linux-mips@linux-mips.org \
--cc=macro@ds2.pg.gda.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