RTC class driver for ppc_md RTC functions
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · On Mon, 28 Apr 2008 12:08:02 +0100 David Woodhouse <[email protected]> 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.
Quoted 5 lines
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.
Quoted 6 lines
Quoted 2 lines
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.
Signature · 6 lines
Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it
Quoted 8 lines · Alessandro Zummo
Quoted 3 lines · On Mon, 28 Apr 2008 12:08:02 +0100 David Woodhouse <[email protected]> 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. :)
Quoted 4 lines
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.
Quoted 2 lines
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.
Quoted 2 lines
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? :)
Signature · 1 line
dwmw2
Quoted 8 lines · On Wed, 30 Apr 2008 18:34:33 +0100 David Woodhouse <[email protected]> wrote:
Quoted 2 lines
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 :(
Quoted 5 lines
Quoted 2 lines
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 :)
Signature · 6 lines
Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it