Hi,
An experimental change to use TSC as a timecounter source on a variety
of modern Intel and AMD CPUs has been just committed and enabled on
OpenBSD/amd64 thanks to the work done by Adam Steen.
The rationale is, quoting the commit message:
If frequency of an invariant (non-stop) time stamp counter is measured
using an independent working timecounter that has a known frequency, we
can assume that the measured TSC frequency is as good as the resolution
of the timecounter that we use to perform the measurement. This lets us
switch from this high quality but expensive source to the cheaper TSC
without sacrificing precision on a wide range of modern CPUs.
You can query and change the current timecounter source in the runtime
via sysctl:
% sysctl kern.timecounter.{choice,hardware}
kern.timecounter.choice=i8254(0) tsc(2000) acpihpet0(1000) acpitimer0(1000)
dummy(-1000000)
kern.timecounter.hardware=tsc
Please make sure your NTP drift (/var/db/ntpd.drift) stays within -20..+20
or at least is not worse than it is right now.
And finally, please make sure to run a "make config" when building the
kernel to update offset tables because of the cpu_info structure changes.
Regards,
Mike