Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2000 09:15:54 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Bruce Evans <bde@zeta.org.au>, Mike Smith <msmith@FreeBSD.ORG>, freebsd-current@FreeBSD.ORG
Subject:   Re: SMP buildworld times / performance tests 
Message-ID:  <200003301715.JAA73702@apollo.backplane.com>
References:   <1274.954416252@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

:In message <Pine.BSF.4.21.0003302111410.3247-100000@alphplex.bde.org>, 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 
					<dillon@backplane.com>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003301715.JAA73702>