From owner-freebsd-arch@FreeBSD.ORG Tue Sep 18 16:48:37 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFC0F106564A; Tue, 18 Sep 2012 16:48:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2F57A8FC08; Tue, 18 Sep 2012 16:48:36 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8IGmc2E029008; Tue, 18 Sep 2012 19:48:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8IGmQan036090; Tue, 18 Sep 2012 19:48:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8IGmQ9T036089; Tue, 18 Sep 2012 19:48:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 18 Sep 2012 19:48:26 +0300 From: Konstantin Belousov To: Poul-Henning Kamp Message-ID: <20120918164826.GI37286@deviant.kiev.zoral.com.ua> References: <22397.1347984776@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2o2UGh95w7MMZdf3" Content-Disposition: inline In-Reply-To: <22397.1347984776@critter.freebsd.dk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: attilio@freebsd.org, arch@freebsd.org Subject: Re: Aliasing issue with TAILQ on ppc64 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 16:48:37 -0000 --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 > , 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--