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 1tWIEe-00FaJr-6K for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2025 16:51:48 +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 1tWIEc-000nXe-Kl for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2025 16:51:46 +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 1tWIEc-000nXV-B0 for pgsql-hackers@lists.postgresql.org; Fri, 10 Jan 2025 16:51:46 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tWIEa-000uF4-09 for pgsql-hackers@postgresql.org; Fri, 10 Jan 2025 16:51:45 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-844e12f702dso67649839f.3 for ; Fri, 10 Jan 2025 08:51:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736527903; x=1737132703; 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=etg2SI6B3lyXnHSi39oYlut4qwZirsdx5pz3BLeTSmo=; b=ezxjrt+5uozLA1El9OCTiMhLulIhrr9Kgk7A/aV1W3KmNuafqZ7vJb9In+WLdd2yrS SFfyUNdwS/pb+w2xGH8MShNU54WHCIRczmFEXvbnGOooVyJINcrmerHd2p46JeUtfWfP jLkQg6P19olGjdQDXqM7oUZNNWugSVuMklFCjdBd1CEs0+mQ0tFj0xKac6x+VrC64j+D zXbWmFEzTXKUVYfYPbtIvSZN0CAJJ59NdlXytYTkUBiJxnW15sQ6nlOScUPqExemBmQL 8c7SL2YZqdBMatbl5t6an8jvyyWfV/GpkLhRGRKfARNe30HZRuqiOKQSdrOw978hHmoP LNDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736527903; x=1737132703; 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=etg2SI6B3lyXnHSi39oYlut4qwZirsdx5pz3BLeTSmo=; b=RLtD2UsRVXTFWQORKYskop6EBZ0hSUvdN+L6hmDvRAnBD0YOfmkK5vP0V0OAYDEH6J V+N/kDVQBxUgW994ckL0t4Hor6ULiGBaNOcCNYvUNxQ40/Tdyiq8j5Q4Oq9xwWjfKgD3 tEsT43MoB9ltsXeOnoG7e5SbD+9RGczDF8Zqs6VF8JEwdIPWeewWmkz3tAzuefuT7qlJ 7RbDzESZuj8Ic9Z+VhQFkm9BYfQ7ho+c38p9usUna/kc/BaeT6GQVUatH+a0sUeqwzo6 KD+k+7TWPUEEEMKg4WyvFEP3hNLDCkY8yX9gHavqgfvp0Kbw/v1wmIMEiW2eWEQ5r8TA p8nQ== X-Gm-Message-State: AOJu0YzdmkVyEHTDOFQcP+PmGJZw4HmCNyDeCoFdIII84w1/3xmSUgv3 wtofuFeM3NoFcrKqwPURBm/wk5OXT8QjcISJuL9qfmQe/IKBBiuo X-Gm-Gg: ASbGncun3GHsjYiPLa+iJUevDfTQVxEB3isUjZbjWzBxm6fqsoA+qF+oPdEnLhSMkGg iavg18Yp0vaeiNwJzNRdlxXMyZ5oJxTbHZIirHw1D4UOTqkE9zu+/uaX/McgcU+zH4AV8byYWdc zDPZvlTdRyBvuUxZc8uvxjhfxkNU18xT4FfODvyiZX50+TDanpn9hJU/hHufkBrJDZJVauzneqS BDwKRjVPU0Az8WEtf+EjL3GtZ224eGVjxW05c3dkVvvwa0QYF5MyBxkvoosFhGehS6jOgRmq3Hr PtjJaPybnWOAiErSt/c6pnIIMYT8BZKAg8rYXByyeQ6QTNc= X-Google-Smtp-Source: AGHT+IFARjFI8C0ZuGVUNW7gzdBDTjDvVvi0YKLp9vQgv9/agug9oKcVuSWH/1a6vaV2Ofc0NJY1cg== X-Received: by 2002:a05:6602:394d:b0:837:7d54:acf1 with SMTP id ca18e2360f4ac-84ce00c90d8mr1033293839f.2.1736527903562; Fri, 10 Jan 2025 08:51:43 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-84d4fb52d34sm96720239f.26.2025.01.10.08.51.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 08:51:42 -0800 (PST) Date: Fri, 10 Jan 2025 10:51:40 -0600 From: Nathan Bossart To: Andres Freund Cc: pgsql-hackers@postgresql.org, dipiets@amazon.com Subject: Re: use a non-locking initial test in TAS_SPIN on AArch64 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jan 08, 2025 at 04:38:02PM -0600, Nathan Bossart wrote: > On Wed, Jan 08, 2025 at 05:25:24PM -0500, Andres Freund wrote: >> I wonder if you're hitting an extreme case of binary-layout related effects? >> I've never seen them at this magnitude though. I'd suggest using either lld >> or mold as linker and comparing the numbers for a few >> -Wl,--shuffle-sections=$seed seed values. > > Will do. Actually, I think I may have just had back luck and/or not warmed things up enough. I just re-ran the test a few dozen times, carefully ensuring the data was in the cache and periodically alternating between the binary with the patch applied and the one without it. The results converged to within 1-2% of each other, with the patched version even winning about half the time. The averages across all the runs showed a ~0.4% regression, which I suspect is well within the noise range. -- nathan