From owner-freebsd-arch@FreeBSD.ORG Tue Sep 18 16:10:46 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 0B27A106566B for ; Tue, 18 Sep 2012 16:10:46 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7BBA28FC08 for ; Tue, 18 Sep 2012 16:10:45 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so159640lbb.13 for ; Tue, 18 Sep 2012 09:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Zyz7QuuzCBactgaju/J/ZDF3m/gOCfHQh/lgE1gsF9s=; b=w4WSEeVR+Wxlg/mw48VNWdYGGzbDAWNB5Hd1XHM522a+sMtbgwYp4ai+28+TphsCXK PQzsKfhYHicu9OSVfEmQLoXUQJ3pnnpQizSDTLnfjcrlLAD3Fim3oBwOGIe2g8G/xuUl 1LULZA73m8H//Y7prfjvRQnMwZoMkZVz5F3G4t5VKoIacMMYn8/cXViidJxMHk111wsi kKPo6ixZKVYmXWWQ7kgxcb1amgW55btqVtmhlpQ9nzgk82mdvlunfiMGIG4a0xN3Y6k3 PrjMSdDMua3rKTjt6BC4nhS465+oL6G6MBlM5K1HDFf7K3HoOj2gUSY1Jwhz2ZlHsK8z upPw== MIME-Version: 1.0 Received: by 10.152.148.162 with SMTP id tt2mr299833lab.10.1347984644133; Tue, 18 Sep 2012 09:10:44 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Tue, 18 Sep 2012 09:10:44 -0700 (PDT) In-Reply-To: <22351.1347984289@critter.freebsd.dk> References: <22351.1347984289@critter.freebsd.dk> Date: Tue, 18 Sep 2012 17:10:44 +0100 X-Google-Sender-Auth: mJmd-o-M-CboIeKWaFr-ipxpw0M Message-ID: From: Attilio Rao To: Poul-Henning Kamp Content-Type: text/plain; charset=UTF-8 Cc: 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 Reply-To: attilio@FreeBSD.org 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:10:46 -0000 On 9/18/12, Poul-Henning Kamp wrote: > In message > > , Attilio Rao writes: > >>Yep, it likely means you need to use compiler memory barriers then. >>I didn't look into details the implementation of TAILQ (but I can if >>you want) > > Yes, It might be helpful if you knew what you were talking about, > rather than shoot from the hip :-) > >> to point you precisely where, but it seems you already know >>that code well enough to tell where. > > I know perfectly well where to insert the memory barrier. I'm not going to reply anymore to this thread, but if you don't understand what I'm saying please stop sending stupid responses like this one. I'm obviously saying to patch *TAILQ* to take into account the possibility of compiler reordering, which has nothing to do with users knowledge of the primitive. > > My point is that I don't think many people amongst our users > would realize that you _need_ memory barriers when you need > TAILQ's and I don't think I know of a single instance in our > source tree that does... > >>TAILQ is certainly subjective to aliasing because it is inlined code, > > It's not inlining that makes it subject to aliasing, it's the casting. > > Please RTFC. What I'm saying is that there could be compiler reordering also *among* several TAILQ operations because they are inlined functions, not only *within* them. Stop acting like the old teacher speaking to stupid students. Attilio -- Peace can only be achieved by understanding - A. Einstein