From owner-freebsd-current Thu Mar 30 9:16: 2 2000 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 13B8737B8F9; Thu, 30 Mar 2000 09:15:59 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id JAA73702; Thu, 30 Mar 2000 09:15:54 -0800 (PST) (envelope-from dillon) Date: Thu, 30 Mar 2000 09:15:54 -0800 (PST) From: Matthew Dillon Message-Id: <200003301715.JAA73702@apollo.backplane.com> To: Poul-Henning Kamp Cc: Bruce Evans , Mike Smith , freebsd-current@FreeBSD.ORG Subject: Re: SMP buildworld times / performance tests References: <1274.954416252@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :In message , Bruce Ev :ans writes: :>On Wed, 29 Mar 2000, Mike Smith wrote: :> :>> Just following on from this, one thing that I can see immediately being :>> very important to me at least is a spinlock in the timecounter structure. :>> Calcru and various other things call microtime(), and we're going to want :>> to lock out updates and parallel accesses to the timecounter. What :>> should we be using for an interrupt-disabling spinlock? :> :>Nothing. Accesses to the timecounter struct are already MP safe and fast. :>Only the i8254 timecounter hardware currently needs interrupt-disabling, :>but it is hopefully never used on SMP machines. : :Worse. It is used by default on SMP machines which don't sport the :PIIX timecounter. : :-- :Poul-Henning Kamp FreeBSD coreteam member :phk@FreeBSD.ORG "Real hackers run -current on their laptop." :FreeBSD -- It will take a long time before progress goes too far! The general problem with the timecounter is that not only is the hardware indeterminant, but the timecounter structure itself is *NOT* MP safe, at least not by my read of it. It also doesn't appear to be interrupt safe. If a microtime() or getmicrotime() call is interrupted and the interrupting interrupt calls microtime(), it can corrupt the data returned by the first guy and even corrupt the structure. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message