Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Dec 2000 14:31:05 -0800 (PST)
From:      Matthew Jacob <mjacob@feral.com>
To:        =?ISO-8859-1?Q?G=E9rard_Roudier?= <groudier@club-internet.fr>
Cc:        John Baldwin <jhb@FreeBSD.ORG>, Bernd Walter <ticso@cicely5.cicely.de>, freebsd-alpha@FreeBSD.ORG
Subject:   RE: mb and wmb in atomic_
Message-ID:  <Pine.LNX.4.21.0012151424090.30110-100000@zeppo.feral.com>
In-Reply-To: <Pine.LNX.4.10.10012152205330.281-100000@linux.local>

next in thread | previous in thread | raw e-mail | index | archive | help
> }
> 
> There is obviously no relevance here in trying to drain something to
> memory. Note that thinking about a mb() as something that drains to memory
> is a serious mistake in my opinion. We want to order there, not to drain
> anything anywhere.

That's correct. The 'drain' notion comes from the idea that write buffers
(either from devices to memory or from memory to devices) may contain data
that needs to arrive at it's 'real' location.


> However, the mb() above does have the effect of throwing away any read 
> that may have been prefetched by the CPU. If we need that here, we must
> not remove the mb(), otherwise the mb() can be removed.

I don't *believe* that this is an issue for Alpha. It is for sparc which is
not a memory coherent model.

We went around and around with this discussion a while back. Since then I've
gotten the newer Alpha architecture book. I'm swamped at the moment, but I'll
post the relevant pages about this some time this weekend.



-matt







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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0012151424090.30110-100000>