summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-12-15 23:15:42 +1100
committerKeith Bostic <keith.bostic@mongodb.com>2016-12-15 07:15:42 -0500
commit2142d32fd6b747022da2bab0cf76b30941bab918 (patch)
tree2b2f68c1cf1b795394cff3aad42739d9fd65a48a /dist
parent18fb0f8da42f5e6045e296b81d86370bf60376f5 (diff)
downloadmongo-2142d32fd6b747022da2bab0cf76b30941bab918.tar.gz
WT-2402 Pad structures to avoid cache line sharing. (#3191)
* WT-2402 Pad structures to avoid cache line sharing. We previously used compiler alignment to avoid cache line sharing, which is problematic because we don't allocate memory with the necessary alignment, so some behavior is undefined. Instead, this change merely pads structs to ensure they won't share a cache line when allocated in an array. * Add some #if barriers around the new union's * Change where CACHE_LINE_PAD defines live and rename _START to _BEGIN * Add ax_check_compile_flag to aclocal * Lint * Allocate the TINFO structures separately to minimize false sharing. * Comment cleanup to make spell happy. * Pad the read-write locks to avoid false sharing. * Add a comment as to why we're adding -std=c11 to the compile. * whitespace * Add asserts that we're padding the structures we intended to pad. Minor cleanup, don't use #defines outside of the WiredTiger namespace.
Diffstat (limited to 'dist')
-rw-r--r--dist/s_define.list8
1 files changed, 5 insertions, 3 deletions
diff --git a/dist/s_define.list b/dist/s_define.list
index 372a251bf01..53a3df87615 100644
--- a/dist/s_define.list
+++ b/dist/s_define.list
@@ -1,5 +1,4 @@
# List of WiredTiger #defines that are "unused", but it's OK.
-ALIGN_CHECK
API_CALL
API_CALL_NOCONF
API_SESSION_INIT
@@ -8,17 +7,18 @@ JOINABLE_CURSOR_CALL_CHECK
LF_MASK
LLONG_MAX
LLONG_MIN
-SIZE_CHECK
TXN_API_CALL
TXN_API_CALL_NOCONF
TXN_API_END
WIN32_LEAN_AND_MEAN
+WT_ALIGN_CHECK
WT_ATOMIC_CAS
WT_ATOMIC_FUNC
WT_BLOCK_DESC_SIZE
WT_BLOCK_HEADER_SIZE
WT_CACHE_LINE_ALIGNMENT
-WT_COMPILER_TYPE_ALIGN
+WT_CACHE_LINE_PAD_BEGIN
+WT_CACHE_LINE_PAD_END
WT_CONN_CHECK_PANIC
WT_DEADLOCK
WT_DEBUG_BYTE
@@ -35,10 +35,12 @@ WT_LOG_SLOT_MAXBITS
WT_LOG_SLOT_UNBUFFERED_ISSET
WT_PACKED_STRUCT_BEGIN
WT_PACKED_STRUCT_END
+WT_PADDING_CHECK
WT_READ_BARRIER
WT_REF_SIZE
WT_SESSION_LOCKED_CHECKPOINT
WT_SESSION_LOCKED_TURTLE
+WT_SIZE_CHECK
WT_STATS_FIELD_TO_OFFSET
WT_STATS_SLOT_ID
WT_STAT_CONN_DECRV