From: William Tu Date: Mon, 26 Aug 2019 23:00:31 +0000 (-0700) Subject: ovs-thread: Make struct spin lock cache aligned. X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ae36d63d7e3c9363e626c86e859ad6e2e2074b58;p=mirror_ovs.git ovs-thread: Make struct spin lock cache aligned. Make the spin lock struct 64-byte aligned to avoid false sharing issue. Signed-off-by: William Tu Signed-off-by: Ben Pfaff --- diff --git a/include/openvswitch/thread.h b/include/openvswitch/thread.h index acc822904..5053cb309 100644 --- a/include/openvswitch/thread.h +++ b/include/openvswitch/thread.h @@ -34,7 +34,7 @@ struct OVS_LOCKABLE ovs_mutex { }; #ifdef HAVE_PTHREAD_SPIN_LOCK -struct OVS_LOCKABLE ovs_spin { +OVS_ALIGNED_STRUCT(64, OVS_LOCKABLE ovs_spin) { pthread_spinlock_t lock; const char *where; /* NULL if and only if uninitialized. */ };