2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-01 06:45:17 +00:00

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 <u9012063@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
William Tu
2019-08-26 16:00:31 -07:00
committed by Ben Pfaff
parent ea41c034db
commit ae36d63d7e

View File

@@ -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. */
};