Messages in this thread | | | Date | Wed, 26 May 1999 14:53:59 +1000 | From | Richard Gooch <> | Subject | Re: [PATCH] * RTC problem ??? |
| |
Rafael Reilova writes: > > > On Wed, 26 May 1999, Richard Gooch wrote: > > > Rafael Reilova writes: > > > Lastly, the problem we are trying to solve seems to be mostly a non-issue, > > > at least at boot, since hwclock can set the system clock properly before > > > anything important happens. The more interesting problem is the one > > > Richard brought up with APM. I think it goes like this: > > > > > > 1) DST changeover is about to happen > > > > > > 2) the machine goes into APM, before doing so the kernel in apm.c > > > computes a timezone offset to be used when coming out of APM. > > > > > > 3) timezone changeover occurs due to DST going on or off. > > > > > > 4) machine comes out of APM, read CMOS and applies wrong offset, sytem > > > time is now warped. > > > > No, this isn't what is happening. The problem is that some machines > > slow down the RTC measurment to the point where the measurement may be > > inaccurate by several seconds. Once the lid is closed, it's too late > > to do an accurate RTC measurement. > > OK understood, but is the above scenario possible? I took a quick look at > apm.c and it seemed to fall for such a situation so I thought that was > what you meant. Happens for posting without checking the old mail...grr
Yes, I guess that's possible.
> About the slowdown, I guess the situation could be detected by doing > two successive reads and checking if they differ significantly. Now > what to do about it is another matter. Maybe we could use a > previously computed offset calculated last time the system time was > changed?
The simplest approach would be to compute the offset whenever the system time is changed (as with netdate or rdate). Stephen is working on a better algorithm than what we have now.
Regards,
Richard....
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |