Synchronize the TSC between all cpus on startup and provide a sysctl,
commit374133e3c50d49999c7163eb8eba674affb42727
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 6 Dec 2005 23:37:55 +0000 (6 23:37 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 6 Dec 2005 23:37:55 +0000 (6 23:37 +0000)
tree949a6c2f8acc3a2a57486eb98e8b0cf2d21ecd88
parent0e2bd767b390767aff4b5cc902f98f389abb41a3
Synchronize the TSC between all cpus on startup and provide a sysctl,
debug.ktr.resynchronize, which will (very expensively) resynchronize the
TSCs 10 times a second to reduce drift errors to manageable numbers.

The TSC on all the cpus for the purposes of ktrdump's ought to be
synchronizated within ~200ns of each other, assuming all cpus are running
at the same frequency.

This needs more work.  What we really need to do is calculate the drift
for each cpu and apply it dynamically.
sys/i386/i386/mp_machdep.c
sys/i386/isa/clock.c
sys/kern/kern_ktr.c
sys/platform/pc32/i386/mp_machdep.c
sys/platform/pc32/isa/clock.c
sys/sys/ktr.h