cvs commit: src/sys/amd64/amd64 cpu_switch.S machdep.c

John Baldwin jhb at freebsd.org
Thu Oct 20 07:28:27 PDT 2005


On Thursday 20 October 2005 01:53 am, Bruce Evans wrote:
> On Tue, 18 Oct 2005, John Baldwin wrote:
> > On Tuesday 18 October 2005 09:44 am, Andrew Gallatin wrote:
> >> It is a shame we can't find a way to use the TSC as a timecounter on
> >> SMP systems.  It seems that about 40% of the context switch time is
> >> spent just waiting for the PIO read of the ACPI-fast or i8254 to
> >> return.
> >
> > You can try it by just setting the kern.timecounter.smp_tsc=1 tunable on
> > boot.
>
> There is no need for this.  Just set the timecounter using sysctl after
> booting (and quickly switch it back if it doesn't work).
>
> This tuneable, like most, shouldn't exist.  It may be a relic from
> when the TSC wasn't put in the list of available timecounters in the
> SMP case.  It is now put in the list with a negative "quaility", but
> the sysctl to set the timecounter correctly not restricted by the
> quality.

Ah, I didn't realize the sysctl let you use negative quality timecounters.  
The tunable does serve to automate it for remote machines I guess since it 
doesn't pessimize the quality on SMP.

-- 
John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the cvs-src mailing list