* Re: [rtc-linux] Re: [PATCH] RTC class driver for ppc_md RTC functions
[not found] ` <1209380882.25560.127.camel@pmac.infradead.org>
@ 2008-04-30 9:39 ` Alessandro Zummo
2008-04-30 17:34 ` David Woodhouse
0 siblings, 1 reply; 3+ messages in thread
From: Alessandro Zummo @ 2008-04-30 9:39 UTC (permalink / raw)
To: David Woodhouse; +Cc: rtc-linux, paulus, linux-kernel
On Mon, 28 Apr 2008 12:08:02 +0100
David Woodhouse <dwmw2@infradead.org> wrote:
>
> I suspect that actually covers quite a lot of devices, but the RTC class
> could happily cope with other types of devices too -- just giving an
If we are talking about milliseconds I think a suspect is not enough.
> infrastructure for them to be notified when NTP comes into sync
> (cf. notify_cmos_timer()) should be sufficient, and after that we can
> leave them to their own devices. We should probably provide the
> common-case 'call me at half past the second' functionality too, though,
> rather than expecting each driver to implement it for itself.
A common thing is something that can be used on a lot of devices. Given that
the rtc class support more than 20 drivers and probably more than 30 devices
and that this "half second" functionality is eventually useful only on one
I won't call it common.
> > And I suspect that the RTC of most PCs is pretty useless for
> > any serious NTP related use.
>
> RTCs in computers are notoriously unreliable. All the more reason to
> want them updated, when the computer is deriving its time sync from
> elsewhere.
The hardware RTC does not need to be updated every time the system
clock is. In fact, as long as the system is running, it's pretty useless.
Most distributions update the RTC from the system timer on shutdown.
This kind of update will also be unreliable on any not-memory-mapped
RTC (think of SPI and I2C) .
My opinion is that such NTP mode could be removed from the kernel/not
implemented in rtc class without loosing anything.
However, there should still be a way to tell the kernel/userspace
that it is being kept in sync with a reliable time source, but that's
not related to RTC.
--
Best regards,
Alessandro Zummo,
Tower Technologies - Torino, Italy
http://www.towertech.it
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rtc-linux] Re: [PATCH] RTC class driver for ppc_md RTC functions
2008-04-30 9:39 ` [rtc-linux] Re: [PATCH] RTC class driver for ppc_md RTC functions Alessandro Zummo
@ 2008-04-30 17:34 ` David Woodhouse
2008-04-30 20:29 ` Alessandro Zummo
0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2008-04-30 17:34 UTC (permalink / raw)
To: Alessandro Zummo; +Cc: rtc-linux, paulus, linux-kernel
On Wed, 2008-04-30 at 11:39 +0200, Alessandro Zummo wrote:
> On Mon, 28 Apr 2008 12:08:02 +0100
> David Woodhouse <dwmw2@infradead.org> wrote:
>
> >
> > I suspect that actually covers quite a lot of devices, but the RTC class
> > could happily cope with other types of devices too -- just giving an
>
> If we are talking about milliseconds I think a suspect is not enough.
Let me rephrase: This is how we're doing it for _every_ machine/platform
which supports update_persistent_clock(). It makes sense to let
individual RTC-class drivers do it differently if they need to, but it's
a damn good default behaviour until/unless someone actually shows that
they need it to be different. :)
> The hardware RTC does not need to be updated every time the system
> clock is. In fact, as long as the system is running, it's pretty useless.
>
> Most distributions update the RTC from the system timer on shutdown.
You're assuming that the machine will shut down in an orderly fashion.
And the update from userspace, if enabled, will never be as accurate as
the one we do from the kernel. We currently go to great pains to ensure
that it happens at precisely the right time, and that's really only
feasible from within the kernel.
> This kind of update will also be unreliable on any not-memory-mapped
> RTC (think of SPI and I2C) .
It's still much more reliable from the kernel than it is from userspace.
> My opinion is that such NTP mode could be removed from the kernel/not
> implemented in rtc class without loosing anything.
Want to send a patch to lkml which removes update_persistent_clock() and
see what people think of that? :)
--
dwmw2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rtc-linux] Re: [PATCH] RTC class driver for ppc_md RTC functions
2008-04-30 17:34 ` David Woodhouse
@ 2008-04-30 20:29 ` Alessandro Zummo
0 siblings, 0 replies; 3+ messages in thread
From: Alessandro Zummo @ 2008-04-30 20:29 UTC (permalink / raw)
To: David Woodhouse; +Cc: rtc-linux, paulus, linux-kernel
On Wed, 30 Apr 2008 18:34:33 +0100
David Woodhouse <dwmw2@infradead.org> wrote:
> >
> > If we are talking about milliseconds I think a suspect is not enough.
>
> Let me rephrase: This is how we're doing it for _every_ machine/platform
> which supports update_persistent_clock(). It makes sense to let
> individual RTC-class drivers do it differently if they need to, but it's
> a damn good default behaviour until/unless someone actually shows that
> they need it to be different. :)
I still do not think that it makes sense to keep an unreliable hw RTC in
sync with the system clock..
I remember somone wrote a kind of ntp subsytem for the kernel but can't
remember who :(
> > My opinion is that such NTP mode could be removed from the kernel/not
> > implemented in rtc class without loosing anything.
>
> Want to send a patch to lkml which removes update_persistent_clock() and
> see what people think of that? :)
I'm not _that_ mad, unless the patch is signed by Linus :)
Anyway I will gladly accept a patch that implements this ntp mode :)
--
Best regards,
Alessandro Zummo,
Tower Technologies - Torino, Italy
http://www.towertech.it
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-30 20:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <18449.48370.434716.293552@cargo.ozlabs.ibm.com>
[not found] ` <20080428102629.6e702137@i1501.lan.towertech.it>
[not found] ` <1209371478.25560.114.camel@pmac.infradead.org>
[not found] ` <20080428105245.5c9fff85@i1501.lan.towertech.it>
[not found] ` <1209378191.25560.121.camel@pmac.infradead.org>
[not found] ` <20080428124033.70e78dcf@i1501.lan.towertech.it>
[not found] ` <1209380882.25560.127.camel@pmac.infradead.org>
2008-04-30 9:39 ` [rtc-linux] Re: [PATCH] RTC class driver for ppc_md RTC functions Alessandro Zummo
2008-04-30 17:34 ` David Woodhouse
2008-04-30 20:29 ` Alessandro Zummo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome