From: Philippe De Muyter <phdm@macqel.be>
To: David Brownell <david-b@pacbell.net>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: RTC subsystem and fractions of seconds
Date: Sun, 7 Jan 2007 11:02:56 +0100 [thread overview]
Message-ID: <20070107100256.GA24013@ingate.macqel.be> (raw)
In-Reply-To: <200701061552.43654.david-b@pacbell.net>
On Sat, Jan 06, 2007 at 03:52:43PM -0800, David Brownell wrote:
> On Saturday 06 January 2007 3:26 pm, Philippe De Muyter wrote:
> > On Fri, Jan 05, 2007 at 07:49:00PM -0800, David Brownell wrote:
> > > > Those rtc's actually have a 1/100th of second
> > > > register. Should the generic rtc interface not support that?
> > >
> > > Are you implying a new userspace API, or just an in-kernel update?
> >
> > My only concern at the moment is initializing linux's timeofday from the rtc
> > quickly and with a good precision.
>
> There will necessarily be a bit of fuzz there since it can take time to
> get that RTC's mutex, and the task setting that time can be preempted.
> Plus, there can also be delays at the I2C or SPI transaction level.
>
>
> > The way it is done currently
> > in drivers/rtc/hctosys.c is 0.5 sec off. We could obtain a much better
> > precision by looping there until the next change (next second for old clocks,
> > next 0.01 second for m41t81, maybe even better for other ones).
>
> Hmm ... "looping" fights against "quickly"; as would "wait for next
> update IRQ" (on RTCs that support that). But it would improve precision,
> at least in the sense of having the system clock and that RTC spending
> less time with the lowest "seconds" digit disagreeing.
>
> This is something you could write a patch for, n'est-ce pas?
That would require changing the interface provided by the rtc class, but
I'll look at it.
>
> - Dave
>
>
--
next prev parent reply other threads:[~2007-01-07 10:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-06 3:49 RTC subsystem and fractions of seconds David Brownell
2007-01-06 23:26 ` Philippe De Muyter
2007-01-06 23:52 ` David Brownell
2007-01-07 1:11 ` Hugh Dickins
2007-01-07 2:54 ` David Brownell
2007-01-07 9:43 ` Hugh Dickins
2007-01-07 10:02 ` Philippe De Muyter [this message]
2007-01-07 10:14 ` Philippe De Muyter
2007-01-08 2:10 ` David Brownell
2007-01-08 10:25 ` Philippe De Muyter
-- strict thread matches above, loose matches on Subject: below --
2007-01-07 22:31 Philippe De Muyter
2007-01-06 2:29 Philippe De Muyter
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=20070107100256.GA24013@ingate.macqel.be \
--to=phdm@macqel.be \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.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