From owner-freebsd-alpha Wed Jun 13 12:54:53 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id B4F7237B401 for <alpha@freebsd.org>; Wed, 13 Jun 2001 12:54:34 -0700 (PDT) (envelope-from phk@freebsd.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.3/8.11.2) with ESMTP id f5DJsS142226 for <alpha@FreeBSD.org>; Wed, 13 Jun 2001 12:54:28 -0700 (PDT) (envelope-from phk@freebsd.org) X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 X-Sieve: cmu-sieve 2.0 Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id MAA93507 for <john@baldwin.cx>; Wed, 13 Jun 2001 12:25:45 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by meow.osd.bsdi.com (8.11.3/8.11.2) with ESMTP id f5DJN1141516 for <jhb@osd.bsdi.com>; Wed, 13 Jun 2001 12:23:01 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 45E2555F87 for <jhb@osd.bsdi.com>; Wed, 13 Jun 2001 12:23:06 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: by hub.freebsd.org (Postfix) id 4345637B408; Wed, 13 Jun 2001 12:23:06 -0700 (PDT) Delivered-To: jhb@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 29A0237B401 for <jhb@freebsd.org>; Wed, 13 Jun 2001 12:23:05 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f5DJMsr50507 for <jhb@freebsd.org>; Wed, 13 Jun 2001 21:22:55 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) Date: Wed, 13 Jun 2001 12:54:33 -0700 (PDT) Message-ID: <50505.992460174@critter> From: Poul-Henning Kamp <phk@freebsd.org> To: alpha@freebsd.org Subject: Re: followup on 8 way SMP pani Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: <freebsd-alpha.FreeBSD.ORG> List-Archive: <http://docs.freebsd.org/mail/> (Web Archive) List-Help: <mailto:majordomo?subject=help> (List Instructions) List-Subscribe: <mailto:majordomo?subject=subscribe%20freebsd-alpha> List-Unsubscribe: <mailto:majordomo?subject=unsubscribe%20freebsd-alpha> X-Loop: FreeBSD.org [ bounced from phk - jhb ] John just pointed out this thread on timecounters to me and I want to clarify some things. The timecounter hardware needs to be global. You cannot use the PCC or TSC of any single CPU unless they are in sync. If you do, you will see time going forward, backwards and sideways. Even on a i386 SMP box you cannot do this because of the various dirty things the BIOS will do in SMM mode. The alphas PCC is useless for timekeeping as anything but a short term interpolator. The clock is created with a on-chip SAW device which has no redeeming qualities whatsoever when it comes to keeping a stable frequency. The ultimate fallback for a SMP machine without suitable hardware is to implement the timecounter in software and tick it once per hardclock from one designated CPU. Your clock resolution will suck but everything will work as advertised. This is probably what should be done for the hardware you guys are talking about. Most of what you need is already there in kern_tc: it's called "dummy_timecounter" and is presently used to cover our behinds until we find real hardware. It might be possible to make some code which uses that basic method but which is able to interpolate using the local CPU's PCC, but so far all my attempts at doing so have had unacceptable high overheads. I have a rewrite of the timecounter code in mind, if you have input to that let me know. -- 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message