Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2005 16:29:03 +0100 (CET)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: timecounter and Hz quality in kern RELENG_6
Message-ID:  <200511081529.jA8FT35q098284@lurza.secnetix.de>
In-Reply-To: <dko8oq$fuo$1@sea.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
martinko <martinkov@pobox.sk> wrote:
 > Oliver Fromme wrote:
 > > Michael Schuh <michael.schuh@gmail.com> wrote:
 > > > After digging in the source i have found that timec.c have an routine for
 > > > computing the so called "Hz quality".
 > > 
 > > During boot, the kernel probes several time counters and
 > > assigns "quality" values.  Typically you have three of
 > > them (i8254, ACPI, TPC).  The time counter with the
 > > highest quality value will be used for timing by default,
 > > but you can change it via sysctl if you know what you are
 > > doing.  Type "sysctl kern.timecounter" and see the result.
 > 
 > are those quality values preset (i.e. TSC = 800) or are they computed 
 > (during boot) somehow? and if the latter, how pls??

They have hardcoded defaults, but some of them are adjusted
under certain circumstances.  For example, the TSC's default
value of 800 is reduced on an SMP-enabled or APM-enabled
system.

You should be able to look it up in the source code easily
yourself.  Look for struct timecounter.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"Perl will consistently give you what you want,
unless what you want is consistency."
        -- Larry Wall



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511081529.jA8FT35q098284>