mirror of
https://github.com/openvswitch/ovs
synced 2025-09-04 08:15:25 +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:
@@ -34,7 +34,7 @@ struct OVS_LOCKABLE ovs_mutex {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_PTHREAD_SPIN_LOCK
|
#ifdef HAVE_PTHREAD_SPIN_LOCK
|
||||||
struct OVS_LOCKABLE ovs_spin {
|
OVS_ALIGNED_STRUCT(64, OVS_LOCKABLE ovs_spin) {
|
||||||
pthread_spinlock_t lock;
|
pthread_spinlock_t lock;
|
||||||
const char *where; /* NULL if and only if uninitialized. */
|
const char *where; /* NULL if and only if uninitialized. */
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user