Re: [PATCH] New x86_64 time code for 2.5.70

Vojtech Pavlik (vojtech@ucw.cz)
Wed, 11 Jun 2003 22:41:44 +0200


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
> + <http://www.intel.com/labs/platcomp/hpet/hpetspec.htm>.
> +
> + If unsure, say Y.
>
> config GENERIC_ISA_DMA
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/