On Thu, 2006-10-12 at 00:32 +0200, Rob van der Heij wrote:
> > If the underlying hardware clock keeps good time, does the Linux clock
> > actually drift?
>
> On zSeries, the Linux system clock was supposed to be locked to the
> TOD (apart from the corrections by ntpd). That's because the TOD is
> used to measure time rather than count by interrupts (similar to the
> instruction counter in Intel CPUs). There have been bugs that caused
> Linux system clock to drop behind. I believe those were/are bugs.

Linux on zSeries uses the TOD clock to initialize the internal time and
to advance that internal time each 1/100 of a second. In the absence of
bugs (we had a few in particular in regart to NO_HZ_IDLE) the linux time
and the TOD will be in sync. If you read the linux time with the
gettimeofday system call the value of the internal linux time will be
adjusted by using the difference of the current TOD clock and the last
jiffy timestamp. That gives you a very good resolution of the clock.
That means as long as you do not use NTP the result of a "STCK" in user
space and the gettimeofday call should be very close. With NTP they will
drift apart.

--
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to