From owner-freebsd-stable@FreeBSD.ORG Tue Nov 8 15:29:07 2005 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B27216A41F for ; Tue, 8 Nov 2005 15:29:07 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id D717B43D48 for ; Tue, 8 Nov 2005 15:29:06 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (tojuzm@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.1/8.13.1) with ESMTP id jA8FT3Ho098285 for ; Tue, 8 Nov 2005 16:29:04 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.1/8.13.1/Submit) id jA8FT35q098284; Tue, 8 Nov 2005 16:29:03 +0100 (CET) (envelope-from olli) Date: Tue, 8 Nov 2005 16:29:03 +0100 (CET) Message-Id: <200511081529.jA8FT35q098284@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG In-Reply-To: X-Newsgroups: list.freebsd-stable User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.11-RELEASE (i386)) Cc: Subject: Re: timecounter and Hz quality in kern RELENG_6 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2005 15:29:07 -0000 martinko wrote: > Oliver Fromme wrote: > > Michael Schuh 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