Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9Baj-0007Fl-4u for pgsql-committers@arkaria.postgresql.org; Sat, 14 Sep 2019 17:12:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i9Bah-0005z8-Pm for pgsql-committers@arkaria.postgresql.org; Sat, 14 Sep 2019 17:12:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9Bah-0005yt-BX for pgsql-committers@lists.postgresql.org; Sat, 14 Sep 2019 17:12:07 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9Baa-0001zK-7c for pgsql-committers@lists.postgresql.org; Sat, 14 Sep 2019 17:12:06 +0000 Received: by mail-pf1-x444.google.com with SMTP id y22so19992400pfr.3 for ; Sat, 14 Sep 2019 10:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3r6Cqif3ri74AlHGEp+Xy+uibHij/8z60gs4a8wef/I=; b=BF99AoaWTRfvcE9oqi2rBPR5JvyfBewcSL9vK036XO1BqiAWkUNlzFY6q28uW3dSTE SNni30djr9wLm12mzRKC+2Nqb3ayMVsk2Khk/yKc11ogA1ouZ7l7CHeKfpos24l9SOzd amjHkmOiaU/q8VOvMymqETWNUeTH+iSL16tYM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3r6Cqif3ri74AlHGEp+Xy+uibHij/8z60gs4a8wef/I=; b=s98wCvMeQSRIjapveAWdHutgZfod+G7bmXDmJqZwZrvPXbqK6zIscAoPOLCFdGj3rO BnKPIWnAYjIJI4rFU5gqfRPIXaNU7hs8Lz89LagVRHyVN6vGxEzh1Ct4vwmUUYVpd3Do l6waUKjBVC8ljRRFH5uymM7buyBRjqZTPwcGRW6OOqFVlTkLldiPI/Tk2JJq5gvUsEKF H924ACHIyUmf4I7/Ez9FB+3jyC+QAWHcugdi3eRIDNn4tAcNpyZDxTP3FuikA2jxTxO1 kq3aBjl/DgPZJbjucbY1BY8yH+fuQJB8YE3rTRoJiBv1kZnpTMwNES+T4yh8v3qnZ3nu Y9Rg== X-Gm-Message-State: APjAAAXkJvkXZ1TQP6RlhtHhVUZEbBgocd3/Frvc8n+BCsREsSm5L7jX 6TPMPyyKHezItgWkEy41YC/ssP917L4= X-Google-Smtp-Source: APXvYqxQIlq/6rlWTXEa3BOb77QRFWHuU4GYoKp2WlzatG2GlSLDRfFYFbpXAKmVmEwuRM2M0lcgbg== X-Received: by 2002:a63:6193:: with SMTP id v141mr49811348pgb.263.1568481117659; Sat, 14 Sep 2019 10:11:57 -0700 (PDT) Received: from rfd.leadboat.com (108-233-125-46.lightspeed.sntcca.sbcglobal.net. [108.233.125.46]) by smtp.gmail.com with ESMTPSA id g5sm345455pgd.82.2019.09.14.10.11.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Sep 2019 10:11:56 -0700 (PDT) Date: Sat, 14 Sep 2019 10:11:54 -0700 From: Noah Misch To: Tom Lane Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: For all ppc compilers, implement pg_atomic_fetch_add_ with inlin Message-ID: <20190914171154.GA3487808@rfd.leadboat.com> References: <7517.1568470247@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7517.1568470247@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Sep 14, 2019 at 10:10:47AM -0400, Tom Lane wrote: > Noah Misch writes: > > For all ppc compilers, implement pg_atomic_fetch_add_ with inline asm. > > prairiedog thinks there's something wrong here --- probably, some global > enabling #define is missing? I can reproduce its situation by commenting out the HAVE_GCC_ symbols in pg_config.h. This commit did "#define PG_HAVE_ATOMIC_U32_SUPPORT" but defined only fetch_add, not compare_exchange. That works with generic-gcc.h, but fallback.h can't replace just one. (Rightly so -- fallback.h defines the pg_atomic_uint32 structure differently.) I can see these ways to fix this: 1. Add pg_atomic_compare_exchange_u{32,64}_impl to arch-ppc.h 2. Arrange for arch-ppc.h to be a no-op when GCC atomics are unavailable 3. Just revert (1) seems best. Since it may be days or weeks before I get to that, I'm inclined to revert after ~24h of total buildfarm exposure.