system time running out - again
"Robson Sales (NETEL - Trana)" <[email protected]> Mon, 26 Dec 2005 17:21:52 -0300
| Newsgroups | gmane.linux.real-time.rtlinux.general |
|---|---|
| Organization | Trana Construçoes Ltda. |
| Message-ID | <[email protected]> |
Hi all! Some time ago, people in this list notified a problem with the system time (see in http://www2.fsmlabs.com/pipermail/rtl/2005-February/030056.html). After some messages, was identified three problems: 1 - A minor error in the HZ variable in include/asm-i368/param.h (the HZ variable was seted with 1000. However, the correct value is 100). This correction was applied. 2 - "the interrupts emulation was changed to trigger the linux side unconditionally which was a hack to kick soft-irq with a low latency independent from the occurance of hardware interrupts, and secondly the pending of irqs to linux unconditionally to allow sharing of irqs". I can't check in the list if this problem was solved or not. 3 - The definition of CLOCK_TICK_RATE (include/asm-i386/timex.h) in AMD Boxes seems to be 1189200 instead 1193100. The value of CLOCK_TICK_RATE was changed to 1189200 for all CPU configs. This correction was applied. I use the kernel 2.4.29 with the current rtl3.2-rc1 from cvs in my boxes. For my surprise, I observe which the system time is running to fast. To check this, I adjust the system time with the ntp server 200.20.186.75. After 10 minutes, the error with this server is more than 2s. It is a great offset in a small time. Following below the ntpdate output: 26 Dec 16:53:13 ntpdate[7757]: adjust time server 200.20.186.75 offset -8.465980 sec after 10min: 26 Dec 17:03:51 ntpdate[7764]: adjust time server 200.20.186.75 offset -2.119054 sec I checks this times with 2 Intel machines (a P4HT and a Celeron D Boxes), with the same kernel configs (PIII processor in config, with local APIC, IO APIC, Unsynced TSC support, APM and ACPI configured). The results are alike. After that, I recompile the kernel with the CLOCK_TICK_RATE seted with 1193182 (the value is found in the timex.h from kernel 2.6 tree). The results are the same in the two boxes. See the ntpdate output: 26 Dec 17:44:32 ntpdate[18590]: adjust time server 200.20.186.75 offset -0.015455 sec after 10 min: 26 Dec 17:54:56 ntpdate[18726]: step time server 200.20.186.75 offset -2.059203 sec. and after ~22min: 26 Dec 18:16:50 ntpdate[18749]: step time server 200.20.186.75 offset -4.354148 sec I check the error in the CLOCK_REALTIME and the CLOCK_GPOS in both situations. The error is +/- 32ns in almost cases. Both the clocks is run much faster than I expected. Someone have any comments or same results with your configurations in your boxes? Comments may be very useful! Best regards, -- Robson Sales _______________________________________________ Rtl mailing list [email protected] http://hq.fsmlabs.com/mailman/listinfo/rtl http:/www.rtlinux-gpl.org/