Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Jan 2002 19:52:32 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Bernd Walter <ticso@cicely9.cicely.de>
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:  <3C33D580.50B5BCAA@mindspring.com>
References:  <XFMail.020102152920.jhb@FreeBSD.org> <200201030002.g0302Eo60575@apollo.backplane.com> <20020103003214.GC53199@cicely9.cicely.de>

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


-- Terry

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?3C33D580.50B5BCAA>