Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlDMu-0001ou-HY for pgsql-pkg-debian@arkaria.postgresql.org; Thu, 11 Nov 2021 16:56:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mlDMt-0004of-IP for pgsql-pkg-debian@arkaria.postgresql.org; Thu, 11 Nov 2021 16:56:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlDMt-0004oV-CB for pgsql-pkg-debian@lists.postgresql.org; Thu, 11 Nov 2021 16:56:07 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlDMo-0001FO-Dz for pgsql-pkg-debian@postgresql.org; Thu, 11 Nov 2021 16:56:06 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1477:c900:5d64:ba0f:289:3e22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4Hqnsq33Lvz3Dwy; Thu, 11 Nov 2021 17:55:59 +0100 (CET) Date: Thu, 11 Nov 2021 17:55:58 +0100 From: Christoph Berg To: "Pop, Sebastian" Cc: PostgreSQL in Debian , "Saidi, Ali" , "Csoma, Csaba" Subject: Re: [PATCH] audo-detect and use -moutline-atomics compilation flag for aarch64 Message-ID: Mail-Followup-To: Christoph Berg , "Pop, Sebastian" , PostgreSQL in Debian , "Saidi, Ali" , "Csoma, Csaba" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1636497120606.54267@amazon.com> <1635266397152.45198@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Pop, Sebastian > > Not here: > > $ gcc --version > > gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 > > $ gcc -v --help -Q 2>/dev/null | grep outline-atomics > > This needs to be on an arm64 machine. Oh, sure. Sorry I was missing a lot of context that wasn't immediately clear. > The outline-atomics flag does not exist when targeting x86_64. > The flag has been back-ported to Ubuntu 20.04 a year and a half ago: IIRC, it went in just before the release in April 2020. It is indeed present there, but not enabled: $ for chroot in *; do echo $chroot:; schroot -c $chroot -- gcc -v --help -Q 2>&1 | grep outline-atomics; done bionic-arm64: bookworm-arm64: -moutline-atomics [enabled] bullseye-arm64: -moutline-atomics [enabled] buster-arm64: focal-arm64: -moutline-atomics [disabled] sid-arm64: -moutline-atomics [enabled] The (newer) Debian dists have it enabled by default. > > Did you rebuild the package locally without changing the Debian version? > > I have not re-compiled gcc. The gcc-9.3 is the one distributed as part of Ubuntu 20.04. Again, that was a lot of context I didn't have. > If you need access to Graviton2 instances, we have a system of credits that we can use to fund compute time for open-source CI projects. > Let me know if you are interested in getting those compute credits, and I will take the request to my management. Thanks for the offer - we already have a arm64 build node sponsored by Huawei that does the job for now. Re: Pop, Sebastian > Could you please let me know what is the process to enable -moutline-atomics for arm64 binaries distributed by PostgreSQL for Ubuntu 20.04? > Using the right LSE atomic instructions is very important for the performance of PostgreSQL on all new arm64 processors. > Please let me know how I can help to enable the flag, test, and benchmark the new packages. First, we need to be convinced it's a good idea. From that I got from the messages you were linking to, Heikki "definitely do[es]n't want to override that decision", and Tom doesn't "find this argument terribly convincing". The benchmarks in https://www.postgresql.org/message-id/1C8D0E58-FB33-4105-AC00-8FA07621F5DD%40amazon.com don't look like the option is a game-changer. Even if we are convinced, we don't have the infrastructure in the package yet to do architecture- and distribution-specific optimizations. Would you (Amazon?) be willing to sponsor the required package engineering? Christoph