From owner-freebsd-current@FreeBSD.ORG Sun Apr 6 11:54:10 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD8F437B401 for ; Sun, 6 Apr 2003 11:54:10 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9D7043FBF for ; Sun, 6 Apr 2003 11:54:09 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h36Is8Ld028860; Sun, 6 Apr 2003 20:54:08 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: des@ofug.org (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 06 Apr 2003 20:40:24 +0200." Date: Sun, 06 Apr 2003 20:54:08 +0200 Message-ID: <28859.1049655248@critter.freebsd.dk> cc: current@freebsd.org Subject: Re: weird fxp / timecounter interaction in top-of-tree X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2003 18:54:11 -0000 In message , Dag-Erling =?iso-8859-1?q?Sm=F8 rgrav?= writes: >"Poul-Henning Kamp" writes: >> > and tc_init() to use the *first* timecounter it runs across (on i386, >> > this is generally the i8254), leaving the admin to pick another one if >> > the default does not suit her. See the attached patch. >> This is wrong. Please do not commit it. > >OK. Any suggestion as to how we could rank timecounters so we can >switch to a better one when it becomes available? Is this something >we can determine statically (with a compiled-in preference list), or >do we have to determine it at run time? Defining "best" is at best hard, so I have resorted to the simple technique we use now: Don't call tc_init on a timecounter unless you want to use it. Provided people set it sensibly, we could add a "priority" field to the timecounter structure and have tc_init() respect that. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.