svn commit: r236456 - in head/sys: amd64/include i386/include

Konstantin Belousov kostikbel at gmail.com
Mon Jun 4 12:51:04 UTC 2012


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120604/c787f590/attachment.pgp


More information about the svn-src-all mailing list