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 1tVx4i-00Cv7W-2U for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jan 2025 18:16:08 +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 1tVx4g-005uMA-OC for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jan 2025 18:16:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tVx4g-005uM1-Dz for pgsql-hackers@lists.postgresql.org; Thu, 09 Jan 2025 18:16:06 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tVx4c-000m2m-2g for pgsql-hackers@postgresql.org; Thu, 09 Jan 2025 18:16:05 +0000 Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3cda56e1dffso3030585ab.1 for ; Thu, 09 Jan 2025 10:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736446561; x=1737051361; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qk1h6KYa1rGRPQfWE/NOJMdLDM/VtNpZZe7UwsuoirM=; b=BesGjSJ6AP+CTNGQyfv2BnuFbKbqDcsofPWQf5PbkGkFBe9VGDxp6yaUObVb37+4Nz aTVW4wIpK/yU+PJC2ErmEUJ+owi5YyWOe6YMHxcEwEHFAHIi+Vk2W3h6KRQJl4qW2TOh 9xTj+mRNYUahcVi6TXZEyq1Yg3kjmQUkxZ60GFr64zPTbclLH+b5zLyX4vOxR9+skxWy ep8Vs5M1SC849Zk5nEqlgJXLZKY4nsMUFso22vcuXpMPaHY1WhXPZ78QQojsk71rUHXo fAcWNxS23UvBzGstoLRnCg3WgxB8uFfceDAwi4R8Y/PAolKZeHS9a5jlq9z/YjypQkEq lD8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736446561; x=1737051361; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qk1h6KYa1rGRPQfWE/NOJMdLDM/VtNpZZe7UwsuoirM=; b=pQxktUXyHfwrZdxmuetjlidPRj/3UwwkMa4ydh94fwIZJZmYMnvVS98IG80RRE0RD3 5hOFqWtfhDVL0eJX9J0jRW6JSqIIFdAg1JXlLydRLjkm5FMdGNxWl+az9DtDUWr7ebiJ gQctKxOs+7Q6h5AKejjLXlESn9OBI+spgnzJ9BYtOqygNu+7VgSYptxLFaIRN47Jlrwu C0bEThbMte2nInX1UlHvwYgRlxOAYNYL7Ji0UH15s6YaNJ5wUIMe0SBEEjPIf/aQV/6m U2Te6PfMqs8VWtQzRHmppAdaxA7e1HDNcWMRLNzAvqENmdHeF5Gn/ayoiCM/RQYRYXFv UoFQ== X-Forwarded-Encrypted: i=1; AJvYcCUDkisW7rDs7IXLVKO2Wn0Xm83RRqI6OWMZP9yIh2GJEqPJ0HCa3gG5yglK+WRi7r9N07dTVoMDA4efm3RY@postgresql.org X-Gm-Message-State: AOJu0Yz9+u4WkBrhUhQ3u+BEHfWO86yifqP/IgJvuS7CptZMCMYsigSb OW82prALahjelIs25fI/pAf0IFNXRuQxGJtOXk6hLlQy9nzuvS4A X-Gm-Gg: ASbGncvGVDiDuG7EMGHXl1Fu6vtohgTwYWIOZ5hp5ViJGMQrPcVHrq2gFi9XEQF6OCP 7cjNOcvPezUzKQplhBWzXwPetraAMNwkjFSrMmzBHRHHk7hWCNsgUh7DSWSNfttsUT2PYQ9Cf3e tHVggFQB1mNru1EGFxjOtQyZgATj66T9K5DdgkwZcEg3Vt5vgdTh1iKZJomzYZzdRBLKa1053r5 hdZCwLkxBy0Zqmx2RTkId0dOVmpwEqhByjhRjbZAEgMEaUBA9Ke1rH50vRxtG9TNvs3d625kBmY pf7ngoyPWqa0DT0WurpWj/7hK6eXSzZL/uTnRGVkEOcWfKo= X-Google-Smtp-Source: AGHT+IEeN6/Y7WniIHkRmOSZONKh/ETgBx/63zbQm+YGg0OeLuIpU9qAuUo1gQ/A/H5NMimQxtQnAg== X-Received: by 2002:a05:6e02:1c8e:b0:3ce:3016:fbc3 with SMTP id e9e14a558f8ab-3ce3a8882c6mr57581275ab.14.1736446561555; Thu, 09 Jan 2025 10:16:01 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4ea1b719634sm435268173.107.2025.01.09.10.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 10:16:00 -0800 (PST) Date: Thu, 9 Jan 2025 12:15:59 -0600 From: Nathan Bossart To: Tom Lane Cc: Andres Freund , pgsql-hackers@postgresql.org, dipiets@amazon.com Subject: Re: use a non-locking initial test in TAS_SPIN on AArch64 Message-ID: References: <1759000.1736377664@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1759000.1736377664@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jan 08, 2025 at 06:07:44PM -0500, Tom Lane wrote: > 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? This was on a c8g.24xlarge (Neoverse-V2, Armv9.0-a) [0]. > 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. Great. This matches what I saw on an M3. [0] https://github.com/aws/aws-graviton-getting-started/blob/main/README.md#building-for-graviton -- nathan