On Mon, Jun 04, 2012 at 12:00:27PM +0200, Tijl Coosemans wrote:
> On 02-06-2012 20:10, Konstantin Belousov wrote:
> > Author: kib
> > Date: Sat Jun  2 18:10:16 2012
> > New Revision: 236456
> > URL: http://svn.freebsd.org/changeset/base/236456
> > 
> > Log:
> >   Use plain store for atomic_store_rel on x86, instead of implicitly
> >   locked xchg instruction.  IA32 memory model guarantees that store has
> >   release semantic, since stores cannot pass loads or stores.
> 
> They can pass non-temporal stores can't they?
Sure. But (our) barriers only work for WB memory accesses, in respect to other
WB memory accesses.

The atomic(9) contains not quite explicit mention of the requirement,
for ia32 and more direct notion for ia64. It could probably be reworded to
mention memory access type explicitely for ia32 too.

At least the code which I saw and maintain which uses the mixed accesses
to the same physical page, sometime including non-CPU caches coherency
protocols, use explicit {s,m}fence barriers as needed.

Attachment: pgpLdICJDfzO6.pgp
Description: PGP signature

Reply via email to