Aliasing issue with TAILQ on ppc64 ?

Konstantin Belousov kostikbel at gmail.com
Tue Sep 18 16:48:37 UTC 2012


On Tue, Sep 18, 2012 at 04:12:56PM +0000, Poul-Henning Kamp wrote:
> In message <CAJ-FndDP3RSjgL_fXap2DyDZdXW3iQ_=jnAx_cCx5uFhFeaq5w at mail.gmail.com>
> , Attilio Rao writes:
> 
> >Stop acting like the old teacher speaking to stupid students.
> 
> A very apt metaphor in this case.
> 
> Adding memory barriers to the TAILQ macros is not something I would
> do lightly, but it is, obviously, one of the possibilties.
> 
> I'd far prefer if we could get away with sticking a couple of
> volatile's in there.

Note that if the issue is with aliasing then barriers has nothing to do
with the fix. In your case it is supposedly cached access from the other
pointer which causes the problem, compiler must not reorder accesses which
provably causes change in the behaviour.
-------------- 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/freebsd-arch/attachments/20120918/5db7939f/attachment.pgp


More information about the freebsd-arch mailing list