timecounter and Hz quality in kern RELENG_6
Oliver Fromme
olli at lurza.secnetix.de
Tue Nov 8 07:29:07 PST 2005
martinko <martinkov at pobox.sk> wrote:
> Oliver Fromme wrote:
> > Michael Schuh <michael.schuh at 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
More information about the freebsd-stable
mailing list