Re: hwclock "hanging" for ~24 hours

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Karel,

 On Tuesday, August 12, 2008 at 14:22:47 +0200, Karel Zak wrote:

> The patch is below. It's based on gettimeofday() rather than on
> SIGALRM (alarm(2)). The gettimeofday has some overhead, but it
> shouldn't be a big problem

Both patches fix Tomasz hang, so they are good.

Indeed, the gettimeofday() and related manipulations seem to have a
small overhead, around 5% of the total time in loop. The big part is
ioctl(RTC_RD_TIME) which is a heavy operation. On my slow test machine,
the RTC_RD_TIME alone takes 57 µs, the rest of the loop takes 3 µs, and
the time wasted after the loop adds 35 µs.

So, on one side 5% is not much. OTOS using alarm() for timeout,
a sharper loop, and an immediate timestamping of the detected tick, the
equivalent busywait_second_change() function in adjtimex 1.26 takes
57 µs total. No overhead, neither in loop nor after.


BTW busywait_for_rtc_clock_tick() is called only when RTC_UIE_ON fails.
What about also calling it when RTC_UIE_ON succeeds, but waiting for the
interrupt timeouts? This is unfortunately a quite common case these
days, with all those misconfigured HPETs. Affected people would then get
normal tick synchronization.


Alain.
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux