Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tVf9V-00AOYE-9g for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jan 2025 23:07:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tVf9U-008MM2-B8 for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jan 2025 23:07:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tVf9U-008MLu-1T for pgsql-hackers@lists.postgresql.org; Wed, 08 Jan 2025 23:07:51 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tVf9R-000bMx-25 for pgsql-hackers@postgresql.org; Wed, 08 Jan 2025 23:07:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 508N7ib91759001; Wed, 8 Jan 2025 18:07:44 -0500 From: Tom Lane To: Nathan Bossart cc: Andres Freund , pgsql-hackers@postgresql.org, dipiets@amazon.com Subject: Re: use a non-locking initial test in TAS_SPIN on AArch64 In-reply-to: References: Comments: In-reply-to Nathan Bossart message dated "Wed, 08 Jan 2025 16:01:19 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1758999.1736377664.1@sss.pgh.pa.us> Date: Wed, 08 Jan 2025 18:07:44 -0500 Message-ID: <1759000.1736377664@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > AFAICT TAS_SPIN() is only used for s_lock(), which doesn't appear to be > used by LWLocks. But I did retry my test from upthread without > pg_stat_statements and was surprised to find a reproducible 4-6% > regression. On what hardware? I just spent an hour beating on my M4 Pro (the 14-core variant) and could not detect any outside-the-noise effect of this patch, with or without pg_stat_statements loaded. There does seem to be a small fraction-of-a-percent-ish benefit. But the run-to-run variation with 60-second "pgbench -S" tests is a couple of percent, so I can't say that that's real. I do feel pretty sure that the patch doesn't hurt on this class of hardware. regards, tom lane