On 4/7/11 10:12 AM, Andriy Gapon wrote:
Guys,

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.

--- a/sys/x86/x86/tsc.c
+++ b/sys/x86/x86/tsc.c
@@ -169,6 +169,9 @@ init_TSC_tc(void)
                        printf("TSC timecounter disabled: APM enabled.\n");
        }

+       if (tsc_is_invariant)
+               tsc_timecounter.tc_quality = 1200;

I like this.
I have to set the timecounter to TSC manually on my machines as using teh default (fast-acpi)
slows my tests down by 10%-20%
mind you if one were to be able to put the tunable into /boot, one could put the sysctl into
/etc/sysctl.conf to do the same thing..

+
  #ifdef SMP
        /*
         * We can not use the TSC in SMP mode unless the TSCs on all CPUs


_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to