From owner-freebsd-arch Thu Jan 3 1:59:38 2002 Delivered-To: freebsd-arch@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id B119F37B416; Thu, 3 Jan 2002 01:59:34 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id g039xJc19506; Thu, 3 Jan 2002 10:59:19 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: from mail.cicely.de (cicely20.cicely.de [10.1.1.22]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g039sZtx049179; Thu, 3 Jan 2002 10:54:35 +0100 (CET)?g (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (cicely9.cicely.de [10.1.7.11]) by mail.cicely.de (8.11.0/8.11.0) with ESMTP id g039sZW13921; Thu, 3 Jan 2002 10:54:35 +0100 (CET) Received: (from ticso@localhost) by cicely9.cicely.de (8.11.6/8.11.6) id g039sYu63685; Thu, 3 Jan 2002 10:54:34 +0100 (CET) (envelope-from ticso) Date: Thu, 3 Jan 2002 10:54:34 +0100 From: Bernd Walter To: Terry Lambert Cc: Matthew Dillon , John Baldwin , arch@FreeBSD.ORG, Bernd Walter , Mike Smith , Bruce Evans , Michal Mertl , Peter Jeremy Subject: Re: When to use atomic_ functions? (was: 64 bit counters) Message-ID: <20020103095433.GI53199@cicely9.cicely.de> References: <200201030002.g0302Eo60575@apollo.backplane.com> <20020103003214.GC53199@cicely9.cicely.de> <3C33D580.50B5BCAA@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C33D580.50B5BCAA@mindspring.com> User-Agent: Mutt/1.3.24i X-Operating-System: FreeBSD cicely9.cicely.de 5.0-CURRENT alpha Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jan 02, 2002 at 07:52:32PM -0800, Terry Lambert wrote: > Bernd Walter wrote: > > You need to hold the mutex while writing and reading. > > If you hold the mutex only while writing another CPU might still use > > old cached values. > > > Unless there are two sounts that MUST remain synchornized for > correct operation, you don't *care* if someone gets the stale > value. > > Ask yourself: what's the worst case failure scenario that would > result? If I ask a value I may get a recent value x. If I ask with another CPU later I may get an older value than x. Having slightly out of date statistisks isn't a problem, but statistiks getting backwards definately are. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message