[ntp:questions] Linux 11-minute mode (RTC update)

Serge Bets serge.bets at NOSPAM.laposte.invalid
Tue Jul 22 16:18:31 UTC 2008


Hello Bill,

 On Monday, July 21, 2008 at 23:30:12 +0000, Unruh wrote:

	[multiboot MS Windows]
> Serge Bets <serge.bets at NOSPAM.laposte.invalid> writes:
>> Windows has set the RTC. The RTC then drifts. Hwclock cannot possibly
>> correct this drift.
> The drift is easy to correct.

How?? Hwclock has no way to determine when Windows has set the RTC.
This could be 30 seconds or 4 days ago. The drift rate is known, but not
the amount of drift accumulated during such unknown period.


> What is hard to correct is the random jump to the time Windows applied

Indeed! :-(


> espcially a problem if your linux clock is on utc

But I'm not sure there is any sane way to make an RTC on UTC cooperate
well with Windows. I tried the registry trick about
HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal,
but got inconsistent results. Worse results than with an RTC on
localtime, where at least the problems happen *only* twice a year.


> until yesterday, there was a bug in the [Linux kernel] rtc code so
> that an attept to use the UIE interrupt ( interrupt when the rtc turns
> over the seconds counter) would return immediately rather than on the
> seconds turnover on the first read.

Wait a minute: I'm aware of several flavours of such early returning
read(/dev/rtc) driver bug. Hwclock implements a pair of workarounds
against this. One is a minimal waiting threshold. The other involves
analysis of the data read(): if the UIE flag 0x80 is lit then it's
assumed to be a real interrupt. Are those workarounds effective against
the bug you're talking about?

I fear not: Usual early returns give data=0, while your report shows
data=0x190, which is a normal value for one UIE interrupt.


>> On Wednesday, July 9, 2008 at 15:53:57 +0200, Ulrich Windl wrote:
>>> OK, I agree that the update may be wrong up to one timer tick.
> One timer tick of the rtc is one second.

Well to the contrary: Ulrich was talking about the jiffies of a
non-tickless kernel (10 ms at HZ=100). His reasoning was right, and
confirmed by measures.


Serge.
-- 
Serge point Bets arobase laposte point net




More information about the questions mailing list