Source-Changes-D archive

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

Re: CVS commit: src/sys



In article <20200508220155.446EEFB28%cvs.NetBSD.org@localhost>,
Andrew Doran <source-changes-d%NetBSD.org@localhost> wrote:
>-=-=-=-=-=-
>
>Module Name:	src
>Committed By:	ad
>Date:		Fri May  8 22:01:55 UTC 2020
>
>Modified Files:
>	src/sys/arch/x86/include: cpu_counter.h
>	src/sys/arch/x86/x86: cpu.c tsc.c
>	src/sys/dev/ic: hpet.c hpetvar.h
>
>Log Message:
>Fix the TSC timecounter (on the systems I have access to):
>
>- Make the early i8254-based calculation of frequency a bit more accurate.
>
>- Keep track of how far the HPET & TSC advance between HPET attach and
>  secondary CPU boot, and use to compute an accurate value before attaching
>  the timecounter.  Initial idea from joerg@.
>
>- When determining skew and drift between CPUs, make each measurement 1000
>  times and pick the lowest observed value.  Increase the error threshold to
>  1000 clock cycles.
>
>- Use the frequency computed on the boot CPU for secondary CPUs too.
>
>- Remove cpu_counter_serializing().

The TSC is still faster than it is supposed to be so ntpd does not sync
(it diverges). It is better than before but not good enough to keep time.

christos



Home | Main Index | Thread Index | Old Index