From: Gabriel Paubert <paubert@iram.es>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Tim Bird <tim.bird@am.sony.com>, linux-kernel@vger.kernel.org
Subject: Re: get_cmos_time() takes up to a second on boot
Date: Mon, 10 May 2004 12:52:30 +0200 [thread overview]
Message-ID: <20040510105230.GA14104@iram.es> (raw)
In-Reply-To: <Pine.LNX.4.58.0405071908060.3271@ppc970.osdl.org>
On Fri, May 07, 2004 at 07:15:53PM -0700, Linus Torvalds wrote:
>
>
> On Fri, 7 May 2004, Tim Bird wrote:
> >
> > What is the downside of disabling this
> > synchronization with the clock edge?
>
> It might not matter any more, but if I remember correctly, the real
> problem was that we used to always write back the time to the CMOS clock
> too, and then booting a few times and consistently getting the time wrong
> the same way made the clock drift quite noticeably.
>
> These days, I think we do the write-back only if we use an external clock
> (NTP), so we probably _could_ just remove the synchronization at
> read-time (removing it at write-time doesn't sound like a good idea).
Indeed, it is necessary at write-time. Note that from my experience
most RTC are not very accurate, as if the first 10 to 12 stages
of the 32768 Hz divider were unaffected by the writes: with 10 msec
jiffies I often see the time jump by a few tens of milliseconds
at boot from ntpdate (I have reference clocks on the same LAN, with
errors only exceptionally above 1 millisecond and the RTC is only written
from the kernel every 11 minutes, _never_ from the shutdown scripts).
>
> Does anybody remember better?
>
> > 1 second of variability is unnacceptable
> > when you're requirement is to boot in
> > .5 seconds. :)
>
> Heh. And yes, it could be handled other ways (you could check the cmos
> busy-waiting).
Fine. But boot time below one second are fundamentally incompatible
with avoiding/minimzing time jumps after user mode has started, which
is what worries me. Well, unless you have better RTC with subsecond
fields, that is.
>
> > Would it be bad to disable this synchronization
> > completely? How about just during boot?
>
> I don't think we should necessarily disable the synchronization, but we
> could certainly make it optional for cases that don't care about it. We
> might even make the default be "don't care about the read
> synchronization".
I'm for one againt dropping the synchronization and even making the
default not to synchronize, I'd rather see this as an option under
the embedded subset for the people who really want fast boot time.
Anybody not booting from ROM/Flash/MTD (the overwhelming majority AFAICS)
won't ever notice the time lost in synchronizing with the RTC edge,
especially if it's not done by busy waiting.
Regards,
Gabriel
next prev parent reply other threads:[~2004-05-10 10:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-08 0:41 Tim Bird
2004-05-08 2:15 ` Linus Torvalds
2004-05-10 6:05 ` Matthias Urlichs
2004-05-10 10:52 ` Gabriel Paubert [this message]
2004-05-10 11:53 ` Andries Brouwer
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=20040510105230.GA14104@iram.es \
--to=paubert@iram.es \
--cc=linux-kernel@vger.kernel.org \
--cc=tim.bird@am.sony.com \
--cc=torvalds@osdl.org \
/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®