[lkml]   [2003]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] New x86_64 time code for 2.5.70
On Wed, Jun 11, 2003 at 11:50:32AM -0700, Bryan O'Sullivan wrote:

> The time code for x86-64 in 2.5.70 isout of date and wildly unstable,
> setting the clock to the year 1,115,117 (!) during boot about 60% of the
> time. This subsequently causes other pieces of completely unrelated
> userspace software to crash randomly for no obvious reason once the
> system comes up.
> I've forward-ported Vojtech's time code from 2.4, fixing some locking
> along the way. The new code supports using the AMD8111 HPET for time
> calculations. It also works stably with the PIT/TSC on every boot,
> which is the source of the time problems in current 2.5.

Thanks a lot for your work!

> Right now, the only known problem is with the fixup of jiffies if a
> timer interrupt is lost, which I've hence turned off. There's
> preliminary support for using HPET for the gettimeofday vsyscall, but
> since vsyscalls are disabled on x86-64 for now, that's obviously
> untested.

This is interesting. I'll have to test why the number of lost tick is
computed incorrectly ....

> --- linux-2.5/arch/x86_64/Kconfig 2003-06-11 11:43:09.000000000 -0700
> +++ x86-64-2.5/arch/x86_64/Kconfig 2003-06-11 10:39:45.000000000 -0700
> @@ -52,6 +52,18 @@
> klogd/syslogd or the X server. You should normally N here, unless
> you want to debug such a crash.
> +config HPET_TIMER
> + bool
> + default n
> + help
> + Use the IA-PC HPET (High Precision Event Timer) to manage
> + time in preference to the PIT and RTC, if a HPET is
> + present. The HPET provides a stable time base on SMP
> + systems, unlike the RTC, but it is more expensive to access,

... probably that should be 'unlike the TSC'? Since RTC does provide a
stable time base on a SMP system, and is very far off chip, too.

> + as it is off-chip. You can find the HPET spec at
> + <>.
> +
> + If unsure, say Y.
> bool

Vojtech Pavlik
SuSE Labs, SuSE CR
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:36    [W:0.085 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site