]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
Revert "MINOR: threads: change lock_t to an unsigned int"
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Feb 2021 14:45:01 +0000 (15:45 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Feb 2021 09:06:45 +0000 (10:06 +0100)
This reverts commit 8f1f177ed0bbdb6c10e61e83994df113452d434f.

Repeated tests have shown a small perforamnce degradation of ~1.8%
caused by this patch at high request rates on 16 threads. The exact
cause is not yet perfectly known but it probably stems in slower
accesses for non-64-bit aligned atomic accesses.

include/haproxy/thread-t.h

index bac83aedb00107c4d8a0e5ef0424a749409de547..e827361646e30d64a9cbe7aaeeaa4ba40ca9bdd0 100644 (file)
@@ -95,8 +95,8 @@
 /*** Common parts below ***/
 
 /* storage types used by spinlocks and RW locks */
-#define __HA_SPINLOCK_T     unsigned int
-#define __HA_RWLOCK_T       unsigned int
+#define __HA_SPINLOCK_T     unsigned long
+#define __HA_RWLOCK_T       unsigned long
 
 
 /* When thread debugging is enabled, we remap HA_SPINLOCK_T and HA_RWLOCK_T to