Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jan 2002 10:54:34 +0100
From:      Bernd Walter <ticso@cicely9.cicely.de>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, John Baldwin <jhb@FreeBSD.ORG>, arch@FreeBSD.ORG, Bernd Walter <ticso@cicely8.cicely.de>, Mike Smith <msmith@FreeBSD.ORG>, Bruce Evans <bde@zeta.org.au>, Michal Mertl <mime@traveller.cz>, Peter Jeremy <peter.jeremy@alcatel.com.au>
Subject:   Re: When to use atomic_ functions? (was: 64 bit counters)
Message-ID:  <20020103095433.GI53199@cicely9.cicely.de>
In-Reply-To: <3C33D580.50B5BCAA@mindspring.com>
References:  <XFMail.020102152920.jhb@FreeBSD.org> <200201030002.g0302Eo60575@apollo.backplane.com> <20020103003214.GC53199@cicely9.cicely.de> <3C33D580.50B5BCAA@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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