From owner-freebsd-arch@FreeBSD.ORG Tue Sep 18 21:18:20 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 B0D421065670 for ; Tue, 18 Sep 2012 21:18:20 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7A75A8FC08 for ; Tue, 18 Sep 2012 21:18:20 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so997098pbb.13 for ; Tue, 18 Sep 2012 14:18:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type:x-gm-message-state; bh=kJ0sDoqmN6FZMlkZI3fiaFgwTuAsuDRfGnho+ayEClw=; b=UwvOcf4qehhBUMvZyyS0hTDa5rMwha4/hI01nDFJD9WLWmC7ZzzkLLwHQJ1NCEQKvW C6JvWNAM6XszgbJbF69EyMFuv0TwY/GsVoAIvnapJkv2yWn8hvaSXBnPqbhatIbuqxP+ voEjgyLuq9omNEFksgI8nUmdeFOORusA4Igcr5wCowlFH1haiYB2NlQ5WKTyC4+32XfZ EJUHDkReiDthLxFUGuFm6wZVlQAkAsx9rpum7b6+7eq059YYQ0tol5htnSf9bNz1swEi s/U7TFiB1wKaY2HooNyfVdW2iEMcnyICi0ZIt6J3v77VRjabdOP4L73W+6Vhmy7tMV5B D9Pw== Received: by 10.68.233.97 with SMTP id tv1mr1877538pbc.96.1348003099896; Tue, 18 Sep 2012 14:18:19 -0700 (PDT) Received: from rrcs-66-91-135-210.west.biz.rr.com (rrcs-66-91-135-210.west.biz.rr.com. [66.91.135.210]) by mx.google.com with ESMTPS id tw5sm552366pbc.48.2012.09.18.14.18.17 (version=SSLv3 cipher=OTHER); Tue, 18 Sep 2012 14:18:19 -0700 (PDT) Date: Tue, 18 Sep 2012 11:17:49 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Poul-Henning Kamp In-Reply-To: <23196.1347999426@critter.freebsd.dk> Message-ID: References: <23196.1347999426@critter.freebsd.dk> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Gm-Message-State: ALoCoQnJsZqyKxjyGrAMitv9IiBzE/4ED5qAmhXaidia5YNYGpTa18Uf0FlNIs8rKg7Wg42WhGgd Cc: Konstantin Belousov , attilio@freebsd.org, freebsd-arch@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 21:18:20 -0000 On Tue, 18 Sep 2012, Poul-Henning Kamp wrote: > In message , Jeff Roberson writes: > >> If you compile at low optimization levels I assume it goes away? > > I don't have access to the machine at this time, and in general > I'm not particular focused on PPC64, since this is a general > problem on any architecture, as I understand the C-language rules. Have you verified that it actually happens on other architectures? It may be a bug only in the ppc backend and not in bsd code. > >> Can you place asm volatile ("" ::: "memory"); between the two tailq macros >> with the same optimization level? > > I tried earlier to put a printf("FOO") there, and that fixed it, which > I why I diagnosed it as an aliasing issue in the first place. I suggest this approach to further narrow the scope of the issue. Jeff > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. >