Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Sep 2012 19:48:26 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        attilio@freebsd.org, arch@freebsd.org
Subject:   Re: Aliasing issue with TAILQ on ppc64 ?
Message-ID:  <20120918164826.GI37286@deviant.kiev.zoral.com.ua>
In-Reply-To: <22397.1347984776@critter.freebsd.dk>
References:  <CAJ-FndDP3RSjgL_fXap2DyDZdXW3iQ_=jnAx_cCx5uFhFeaq5w@mail.gmail.com> <22397.1347984776@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--2o2UGh95w7MMZdf3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 18, 2012 at 04:12:56PM +0000, Poul-Henning Kamp wrote:
> In message <CAJ-FndDP3RSjgL_fXap2DyDZdXW3iQ_=3DjnAx_cCx5uFhFeaq5w@mail.gm=
ail.com>
> , Attilio Rao writes:
>=20
> >Stop acting like the old teacher speaking to stupid students.
>=20
> A very apt metaphor in this case.
>=20
> Adding memory barriers to the TAILQ macros is not something I would
> do lightly, but it is, obviously, one of the possibilties.
>=20
> 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.

--2o2UGh95w7MMZdf3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAlBYpdkACgkQC3+MBN1Mb4hfkACfSJiyq65ga0vWGK/WMLQfOxAP
oNwAnjtBv9BEBxNpsWgudDgJWR0PjnrN
=EE2m
-----END PGP SIGNATURE-----

--2o2UGh95w7MMZdf3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120918164826.GI37286>