diff options
author | William Tu <u9012063@gmail.com> | 2019-08-26 16:00:31 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-08-28 12:08:30 -0700 |
commit | ae36d63d7e3c9363e626c86e859ad6e2e2074b58 (patch) | |
tree | 298759c7cb5dbe239187df11a59fe71f57dfa6df /include/openvswitch | |
parent | ea41c034dbc76fccfef6ce71e8a4768d6eff0b3a (diff) | |
download | openvswitch-ae36d63d7e3c9363e626c86e859ad6e2e2074b58.tar.gz |
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>
Diffstat (limited to 'include/openvswitch')
-rw-r--r-- | include/openvswitch/thread.h | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ }; |