pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi 7+ messages / 1 participants [nested] [flat]
* pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi @ 2022-11-02 21:37 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-11-02 21:37 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow use of __sync_lock_test_and_set for spinlocks on any machine. If we have no special-case code in s_lock.h for the current platform, but the compiler has __sync_lock_test_and_set, use that instead of failing. It's unlikely that anybody's __sync_lock_test_and_set would be so awful as to be worse than our semaphore-based fallback, but if it is, they can (continue to) use --disable-spinlocks. This allows removal of the RISC-V special case installed by commit c32fcac56, which generated exactly the same code but only on that platform. Usefully, the RISC-V buildfarm animals should now test at least the int variant of this patch. I've manually tested both variants on ARM by dint of removing the ARM-specific stanza. We don't want to drop that, because it already has some special knowledge and is likely to grow more over time. Likewise, this is not meant to preclude installing special cases for other arches if that proves worthwhile. Per discussion of a request to install the same code for loongarch64. Like the previous patch, we might as well back-patch to supported branches. Discussion: https://postgr.es/m/761ac43d44b84d679ba803c2bd947cc0@HSMAILSVR04.hs.handsome.com.cn Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c479492c04eeec0ae1bce270b2bb21851add8a78 Modified Files -------------- src/include/storage/s_lock.h | 68 +++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi @ 2022-11-02 21:37 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-11-02 21:37 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow use of __sync_lock_test_and_set for spinlocks on any machine. If we have no special-case code in s_lock.h for the current platform, but the compiler has __sync_lock_test_and_set, use that instead of failing. It's unlikely that anybody's __sync_lock_test_and_set would be so awful as to be worse than our semaphore-based fallback, but if it is, they can (continue to) use --disable-spinlocks. This allows removal of the RISC-V special case installed by commit c32fcac56, which generated exactly the same code but only on that platform. Usefully, the RISC-V buildfarm animals should now test at least the int variant of this patch. I've manually tested both variants on ARM by dint of removing the ARM-specific stanza. We don't want to drop that, because it already has some special knowledge and is likely to grow more over time. Likewise, this is not meant to preclude installing special cases for other arches if that proves worthwhile. Per discussion of a request to install the same code for loongarch64. Like the previous patch, we might as well back-patch to supported branches. Discussion: https://postgr.es/m/761ac43d44b84d679ba803c2bd947cc0@HSMAILSVR04.hs.handsome.com.cn Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a5737e765d85c170a035ee5eedf5d4cd8e9d5128 Modified Files -------------- src/include/storage/s_lock.h | 68 +++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi @ 2022-11-02 21:37 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-11-02 21:37 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow use of __sync_lock_test_and_set for spinlocks on any machine. If we have no special-case code in s_lock.h for the current platform, but the compiler has __sync_lock_test_and_set, use that instead of failing. It's unlikely that anybody's __sync_lock_test_and_set would be so awful as to be worse than our semaphore-based fallback, but if it is, they can (continue to) use --disable-spinlocks. This allows removal of the RISC-V special case installed by commit c32fcac56, which generated exactly the same code but only on that platform. Usefully, the RISC-V buildfarm animals should now test at least the int variant of this patch. I've manually tested both variants on ARM by dint of removing the ARM-specific stanza. We don't want to drop that, because it already has some special knowledge and is likely to grow more over time. Likewise, this is not meant to preclude installing special cases for other arches if that proves worthwhile. Per discussion of a request to install the same code for loongarch64. Like the previous patch, we might as well back-patch to supported branches. Discussion: https://postgr.es/m/761ac43d44b84d679ba803c2bd947cc0@HSMAILSVR04.hs.handsome.com.cn Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/058c7b5dd4cc6d8f3561f843fe0f1a7839e2b26d Modified Files -------------- src/include/storage/s_lock.h | 68 +++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi @ 2022-11-02 21:37 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-11-02 21:37 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow use of __sync_lock_test_and_set for spinlocks on any machine. If we have no special-case code in s_lock.h for the current platform, but the compiler has __sync_lock_test_and_set, use that instead of failing. It's unlikely that anybody's __sync_lock_test_and_set would be so awful as to be worse than our semaphore-based fallback, but if it is, they can (continue to) use --disable-spinlocks. This allows removal of the RISC-V special case installed by commit c32fcac56, which generated exactly the same code but only on that platform. Usefully, the RISC-V buildfarm animals should now test at least the int variant of this patch. I've manually tested both variants on ARM by dint of removing the ARM-specific stanza. We don't want to drop that, because it already has some special knowledge and is likely to grow more over time. Likewise, this is not meant to preclude installing special cases for other arches if that proves worthwhile. Per discussion of a request to install the same code for loongarch64. Like the previous patch, we might as well back-patch to supported branches. Discussion: https://postgr.es/m/761ac43d44b84d679ba803c2bd947cc0@HSMAILSVR04.hs.handsome.com.cn Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1c72d82c25849307416db140007674c674bdee10 Modified Files -------------- src/include/storage/s_lock.h | 67 +++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi @ 2022-11-02 21:37 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-11-02 21:37 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow use of __sync_lock_test_and_set for spinlocks on any machine. If we have no special-case code in s_lock.h for the current platform, but the compiler has __sync_lock_test_and_set, use that instead of failing. It's unlikely that anybody's __sync_lock_test_and_set would be so awful as to be worse than our semaphore-based fallback, but if it is, they can (continue to) use --disable-spinlocks. This allows removal of the RISC-V special case installed by commit c32fcac56, which generated exactly the same code but only on that platform. Usefully, the RISC-V buildfarm animals should now test at least the int variant of this patch. I've manually tested both variants on ARM by dint of removing the ARM-specific stanza. We don't want to drop that, because it already has some special knowledge and is likely to grow more over time. Likewise, this is not meant to preclude installing special cases for other arches if that proves worthwhile. Per discussion of a request to install the same code for loongarch64. Like the previous patch, we might as well back-patch to supported branches. Discussion: https://postgr.es/m/761ac43d44b84d679ba803c2bd947cc0@HSMAILSVR04.hs.handsome.com.cn Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5ecf836e9b5e12e15cc2b9258c3dbd5ff4f7abc1 Modified Files -------------- src/include/storage/s_lock.h | 68 +++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi @ 2022-11-02 21:37 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-11-02 21:37 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow use of __sync_lock_test_and_set for spinlocks on any machine. If we have no special-case code in s_lock.h for the current platform, but the compiler has __sync_lock_test_and_set, use that instead of failing. It's unlikely that anybody's __sync_lock_test_and_set would be so awful as to be worse than our semaphore-based fallback, but if it is, they can (continue to) use --disable-spinlocks. This allows removal of the RISC-V special case installed by commit c32fcac56, which generated exactly the same code but only on that platform. Usefully, the RISC-V buildfarm animals should now test at least the int variant of this patch. I've manually tested both variants on ARM by dint of removing the ARM-specific stanza. We don't want to drop that, because it already has some special knowledge and is likely to grow more over time. Likewise, this is not meant to preclude installing special cases for other arches if that proves worthwhile. Per discussion of a request to install the same code for loongarch64. Like the previous patch, we might as well back-patch to supported branches. Discussion: https://postgr.es/m/761ac43d44b84d679ba803c2bd947cc0@HSMAILSVR04.hs.handsome.com.cn Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/19cefebe71ea2a2dca12c01f607375637fa7ea28 Modified Files -------------- src/include/storage/s_lock.h | 68 +++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi @ 2022-11-02 21:37 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-11-02 21:37 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow use of __sync_lock_test_and_set for spinlocks on any machine. If we have no special-case code in s_lock.h for the current platform, but the compiler has __sync_lock_test_and_set, use that instead of failing. It's unlikely that anybody's __sync_lock_test_and_set would be so awful as to be worse than our semaphore-based fallback, but if it is, they can (continue to) use --disable-spinlocks. This allows removal of the RISC-V special case installed by commit c32fcac56, which generated exactly the same code but only on that platform. Usefully, the RISC-V buildfarm animals should now test at least the int variant of this patch. I've manually tested both variants on ARM by dint of removing the ARM-specific stanza. We don't want to drop that, because it already has some special knowledge and is likely to grow more over time. Likewise, this is not meant to preclude installing special cases for other arches if that proves worthwhile. Per discussion of a request to install the same code for loongarch64. Like the previous patch, we might as well back-patch to supported branches. Discussion: https://postgr.es/m/761ac43d44b84d679ba803c2bd947cc0@HSMAILSVR04.hs.handsome.com.cn Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a0f9be1f9266e4080dd31bb37fea91b5d5e3b15f Modified Files -------------- src/include/storage/s_lock.h | 68 +++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 23 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2022-11-02 21:37 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-11-02 21:37 pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi Tom Lane <tgl@sss.pgh.pa.us> 2022-11-02 21:37 pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi Tom Lane <tgl@sss.pgh.pa.us> 2022-11-02 21:37 pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi Tom Lane <tgl@sss.pgh.pa.us> 2022-11-02 21:37 pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi Tom Lane <tgl@sss.pgh.pa.us> 2022-11-02 21:37 pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi Tom Lane <tgl@sss.pgh.pa.us> 2022-11-02 21:37 pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi Tom Lane <tgl@sss.pgh.pa.us> 2022-11-02 21:37 pgsql: Allow use of __sync_lock_test_and_set for spinlocks on any machi Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox