Re: i386/RTC: old problem, new solution?

Richard Gooch (rgooch@atnf.csiro.au)
Wed, 26 May 1999 23:32:28 +1000


Jamie Lokier writes:
> Regarding RTC timezones and APM,
>
> Richard Gooch wrote:
> > The problem is that the Dell Inspiron 3200 slows down the
> > system even before the kernel can allow the suspend event. This makes
> > the RTC measurement take several seconds.
> >
> > Even without the Inspiron problem, you get up to 1 second error. This
> > accumulates for every suspend/resume cycle. Close and open your laptop
> > 10 times a day and you lose 10 seconds a day. Stephen is working on a
> > better measurement algorithm.
>
> Why is this a problem, given that timezones are always on 1/N hour
> boundaries? [where N is some value like 2, 4 or 6 that I don't know ;-) ]
>
> Can't we round the measured value to the nearest boundary?

Sure, a 5 minute rounding could be used, but that assumes the RTC and
system clock are kept in sync (not an unreasonable assumption). But
there remains the problem of having to do the measurement when the
system is slowed down pending suspend confirmation from the
kernel. This can take a while (IIRC, I've measured up to 10-15
seconds).

It's not fun waiting a long time for your system to suspend. You don't
want to bump your laptop while the drive is still spinning, so you
wait for it to finish suspending.

No, the measurement cannot be done after the kernel receives the
suspend "request", because by then the system might not be
behaving. That's why doing the measurement at settimeofday() is a
better solution. And Stephen may have an even better solution (I don't
recall what he came up with).

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/