prefer tsc timecounter when it's good

Chuck Swiger cswiger at mac.com
Thu Apr 7 18:59:25 UTC 2011


Hi--

On Apr 7, 2011, at 10:12 AM, Andriy Gapon wrote:
> what do you think about the following change?
> The idea is mark TSC as the best timecounter when it's invariant and synchronized
> between cores.
> Unfortunately I don't have code to auto-detect the synchronization and keep
> relying on the corresponding tunable.  I thought about auto-setting it for
> single-package configurations, but even that information is currently not trivial
> to get out of our mp (i386/amd64) machdep code.

In theory, most machines with P-state invariant TSCs should have their counters completely synchronized, even if there are multiple packages:

  http://software.intel.com/en-us/forums/showthread.php?t=74798
  http://www.intel.com/Assets/PDF/manual/253668.pdf

...the exception would be very large machines with multiple mainboards.

Regards,
-- 
-Chuck



More information about the freebsd-current mailing list