Re: prefer tsc timecounter when it's good

From: Jung-uk Kim <jkim_at_FreeBSD.org>
Date: Tue, 26 Apr 2011 13:49:40 -0400
On Friday 08 April 2011 01:43 am, Andriy Gapon wrote:
> on 07/04/2011 23:00 Jung-uk Kim said the following:
> > Although it looks okay, please don't commit it just yet.  I am
> > working in this area actively.  Also, if the Intel's claim is
> > true, i.e., TSCs reset to zero when APs start, we cannot use TSC
> > as a timecounter hardware until all APs are started properly.
>
> Great!  Thank you for the info and your work.

Can you please test attached patch?  You can get it from here, too:

http://people.freebsd.org/~jkim/tsc_smp_test.diff

Currently this patch samples 3,000 times to determine if any CPU has 
out-of-order TSC but it may be too much, especially for large SMP 
machines.  If it takes too long, I'll lower the number.  Please 
report if that's the case.

Please note this patch also changes HPET, ACPI-fast and TSC qualities.  
However, TSC on SMP does not change the default quality, i.e., HPET 
or ACPI timer will be chosen by default, because we cannot be sure if 
they'll drift later.  If the user is sure that they don't drift AND 
it is absolutely constant, kern.timecounter.smp_tsc tunable can be 
used to set better quality.

Thanks,

Jung-uk Kim

Received on Tue Apr 26 2011 - 15:49:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC