diff options
author | Etienne Petrel <etienne.petrel@mongodb.com> | 2022-03-29 01:02:38 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-29 01:29:17 +0000 |
commit | 240a7b44a3ea8793dec45e0cf1261e82e56e80c4 (patch) | |
tree | c0636edaf593676a39fb2e6d2615d6afdfa30ac7 | |
parent | 7cd7012a296893144c4934866d986484bccda870 (diff) | |
download | mongo-240a7b44a3ea8793dec45e0cf1261e82e56e80c4.tar.gz |
Import wiredtiger: 74b25916863182559430e85a8e2fea12f0afebcf from branch mongodb-master
ref: 9823f16b93..74b2591686
for: 6.0.0
Reverted ticket(s):
WT-8958 Improvements to ARM and other stress tests on evergreen
16 files changed, 4 insertions, 151 deletions
diff --git a/src/third_party/wiredtiger/cmake/configs/aarch64/darwin/config.cmake b/src/third_party/wiredtiger/cmake/configs/aarch64/darwin/config.cmake index 89f6e9d22de..6e3ffebaa6a 100644 --- a/src/third_party/wiredtiger/cmake/configs/aarch64/darwin/config.cmake +++ b/src/third_party/wiredtiger/cmake/configs/aarch64/darwin/config.cmake @@ -17,10 +17,3 @@ if(has_moutline_atomics) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -moutline-atomics" CACHE STRING "" FORCE) endif() unset(has_moutline_atomics CACHE) - -# Enable ARM Neon SIMD instrinsics when available. -CHECK_INCLUDE_FILE("arm_neon.h" has_arm_neon) -if(has_arm_neon) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_ARM_NEON_INTRIN_H" CACHE STRING "" FORCE) -endif() -unset(has_arm_neon CACHE) diff --git a/src/third_party/wiredtiger/cmake/configs/aarch64/linux/config.cmake b/src/third_party/wiredtiger/cmake/configs/aarch64/linux/config.cmake index cdbe569e359..a72bfe0f465 100644 --- a/src/third_party/wiredtiger/cmake/configs/aarch64/linux/config.cmake +++ b/src/third_party/wiredtiger/cmake/configs/aarch64/linux/config.cmake @@ -25,10 +25,3 @@ if(has_moutline_atomics) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -moutline-atomics" CACHE STRING "" FORCE) endif() unset(has_moutline_atomics CACHE) - -# Enable ARM Neon SIMD instrinsics when available. -CHECK_INCLUDE_FILE("arm_neon.h" have_arm_neon) -if(have_arm_neon) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_ARM_NEON_INTRIN_H" CACHE STRING "" FORCE) -endif() -unset(has_arm_neon CACHE) diff --git a/src/third_party/wiredtiger/cmake/configs/base.cmake b/src/third_party/wiredtiger/cmake/configs/base.cmake index 6a02b121308..9980f5fa5d1 100644 --- a/src/third_party/wiredtiger/cmake/configs/base.cmake +++ b/src/third_party/wiredtiger/cmake/configs/base.cmake @@ -43,12 +43,6 @@ config_bool( ) config_bool( - NON_BARRIER_DIAGNOSTIC_YIELDS - "Don't set a full barrier when yielding threads in diagnostic mode. Requires diagnostic mode to be enabled." - DEFAULT OFF -) - -config_bool( HAVE_UNITTEST "Enable WiredTiger unit tests" DEFAULT OFF @@ -251,10 +245,6 @@ if(HAVE_DIAGNOSTIC AND (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")) endif() endif() -if (NON_BARRIER_DIAGNOSTIC_YIELDS AND NOT HAVE_DIAGNOSTIC) - message(FATAL_ERROR "`NON_BARRIER_DIAGNOSTIC_YIELDS` can only be enabled when `HAVE_DIAGNOSTIC` is enabled.") -endif() - if(WT_WIN) # Check if we a using the dynamic or static run-time library. if(DYNAMIC_CRT) diff --git a/src/third_party/wiredtiger/cmake/configs/wiredtiger_config.h.in b/src/third_party/wiredtiger/cmake/configs/wiredtiger_config.h.in index 4072a12e8f9..c0b822ff160 100644 --- a/src/third_party/wiredtiger/cmake/configs/wiredtiger_config.h.in +++ b/src/third_party/wiredtiger/cmake/configs/wiredtiger_config.h.in @@ -33,9 +33,6 @@ /* Define to 1 for diagnostic tests. */ #cmakedefine HAVE_DIAGNOSTIC 1 -/* Define to 1 to remove full memory barriers on diagnostic yields. */ -#cmakedefine NON_BARRIER_DIAGNOSTIC_YIELDS 0 - /* Define to 1 for unit tests. */ #cmakedefine HAVE_UNITTEST 0 diff --git a/src/third_party/wiredtiger/cmake/configs/x86/darwin/config.cmake b/src/third_party/wiredtiger/cmake/configs/x86/darwin/config.cmake index f8655792258..af930bc808b 100644 --- a/src/third_party/wiredtiger/cmake/configs/x86/darwin/config.cmake +++ b/src/third_party/wiredtiger/cmake/configs/x86/darwin/config.cmake @@ -1,10 +1,3 @@ set(WT_ARCH "x86" CACHE STRING "") set(WT_OS "darwin" CACHE STRING "") set(WT_POSIX ON CACHE BOOL "") - -# Enable x86 SIMD instrinsics when available. -CHECK_INCLUDE_FILE("x86intrin.h" has_x86intrin) -if(has_x86intrin) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_X86INTRIN_H" CACHE STRING "" FORCE) -endif() -unset(has_x86intrin CACHE) diff --git a/src/third_party/wiredtiger/cmake/configs/x86/linux/config.cmake b/src/third_party/wiredtiger/cmake/configs/x86/linux/config.cmake index 7bb09eb29ab..159c2a9ed70 100644 --- a/src/third_party/wiredtiger/cmake/configs/x86/linux/config.cmake +++ b/src/third_party/wiredtiger/cmake/configs/x86/linux/config.cmake @@ -9,10 +9,3 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE") # Linux requires buffers aligned to 4KB boundaries for O_DIRECT to work. set(WT_BUFFER_ALIGNMENT_DEFAULT "4096" CACHE STRING "") - -# Enable x86 SIMD instrinsics when available. -CHECK_INCLUDE_FILE("x86intrin.h" has_x86intrin) -if(has_x86intrin) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_X86INTRIN_H" CACHE STRING "" FORCE) -endif() -unset(has_x86intrin CACHE) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index bf5b6624007..3b91ad72598 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "9823f16b935907748705389093fb29775c444498" + "commit": "74b25916863182559430e85a8e2fea12f0afebcf" } diff --git a/src/third_party/wiredtiger/src/docs/build-posix.dox b/src/third_party/wiredtiger/src/docs/build-posix.dox index 75f9969e7b9..6a96c19b32b 100644 --- a/src/third_party/wiredtiger/src/docs/build-posix.dox +++ b/src/third_party/wiredtiger/src/docs/build-posix.dox @@ -105,11 +105,6 @@ Configure WiredTiger to sleep and wait for a debugger to attach on failure. Configure WiredTiger to perform various run-time diagnostic tests. <b>DO NOT</b> configure this option in production environments. -@par \c -DNON_BARRIER_DIAGNOSTIC_YIELDS=1 -Configure WiredTiger to not use memory barriers when yielding threads for diagnostic purposes. -Requires that HAVE_DIAGNOSTIC is also enabled. -<b>DO NOT</b> configure this option in production environments. - @par \c -DENABLE_LZ4=1 Configure WiredTiger for <a href="https://github.com/Cyan4973/lz4">LZ4</a> compression; see @ref compression for more information. diff --git a/src/third_party/wiredtiger/src/docs/build-windows.dox b/src/third_party/wiredtiger/src/docs/build-windows.dox index 918eed85ff0..759ccfa32d3 100644 --- a/src/third_party/wiredtiger/src/docs/build-windows.dox +++ b/src/third_party/wiredtiger/src/docs/build-windows.dox @@ -97,11 +97,6 @@ Configure WiredTiger to sleep and wait for a debugger to attach on failure. Configure WiredTiger to perform various run-time diagnostic tests. <b>DO NOT</b> configure this option in production environments. -@par \c -DNON_BARRIER_DIAGNOSTIC_YIELDS=1 -Configure WiredTiger to not use memory barriers when yielding threads for diagnostic purposes. -Requires that HAVE_DIAGNOSTIC is also enabled. -<b>DO NOT</b> configure this option in production environments. - @par \c -DENABLE_LZ4=1 Configure WiredTiger for <a href="https://github.com/Cyan4973/lz4">LZ4</a> compression; see @ref compression for more information. diff --git a/src/third_party/wiredtiger/src/docs/spell.ok b/src/third_party/wiredtiger/src/docs/spell.ok index 144eed9cea2..5ee6ec9d409 100644 --- a/src/third_party/wiredtiger/src/docs/spell.ok +++ b/src/third_party/wiredtiger/src/docs/spell.ok @@ -37,7 +37,6 @@ DCMAKE DENABLE DHANDLE DHAVE -DNON DONTNEED DSPINLOCK DWT diff --git a/src/third_party/wiredtiger/src/include/error.h b/src/third_party/wiredtiger/src/include/error.h index a59b0c51c6e..9acb8a9d6f0 100644 --- a/src/third_party/wiredtiger/src/include/error.h +++ b/src/third_party/wiredtiger/src/include/error.h @@ -11,12 +11,7 @@ #define WT_DEBUG_BYTE (0xab) /* In DIAGNOSTIC mode, yield in places where we want to encourage races. */ -#if defined HAVE_DIAGNOSTIC && defined NON_BARRIER_DIAGNOSTIC_YIELDS -#define WT_DIAGNOSTIC_YIELD \ - do { \ - __wt_yield_no_barrier(); \ - } while (0) -#elif defined HAVE_DIAGNOSTIC && !defined NON_BARRIER_DIAGNOSTIC_YIELDS +#ifdef HAVE_DIAGNOSTIC #define WT_DIAGNOSTIC_YIELD \ do { \ __wt_yield(); \ diff --git a/src/third_party/wiredtiger/src/include/extern_posix.h b/src/third_party/wiredtiger/src/include/extern_posix.h index 02fe6a9f1dd..cee85e85c42 100644 --- a/src/third_party/wiredtiger/src/include/extern_posix.h +++ b/src/third_party/wiredtiger/src/include/extern_posix.h @@ -65,7 +65,6 @@ extern void __wt_stream_set_no_buffer(FILE *fp) WT_GCC_FUNC_DECL_ATTRIBUTE((visi extern void __wt_thread_id(uintmax_t *id) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))); extern void __wt_unmap_file(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session); extern void __wt_yield(void) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))); -extern void __wt_yield_no_barrier(void) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))); #ifdef HAVE_UNITTEST diff --git a/src/third_party/wiredtiger/src/include/extern_win.h b/src/third_party/wiredtiger/src/include/extern_win.h index ab519fd8cc0..2a769ac667d 100644 --- a/src/third_party/wiredtiger/src/include/extern_win.h +++ b/src/third_party/wiredtiger/src/include/extern_win.h @@ -61,7 +61,6 @@ extern void __wt_stream_set_line_buffer(FILE *fp); extern void __wt_stream_set_no_buffer(FILE *fp); extern void __wt_thread_id(uintmax_t *id); extern void __wt_yield(void); -extern void __wt_yield_no_barrier(void) WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default"))); #ifdef HAVE_UNITTEST diff --git a/src/third_party/wiredtiger/src/os_posix/os_yield.c b/src/third_party/wiredtiger/src/os_posix/os_yield.c index 3d25c5263e0..9d678ae42c5 100644 --- a/src/third_party/wiredtiger/src/os_posix/os_yield.c +++ b/src/third_party/wiredtiger/src/os_posix/os_yield.c @@ -24,19 +24,3 @@ __wt_yield(void) WT_GCC_FUNC_ATTRIBUTE((visibility("default"))) sched_yield(); } - -/* - * __wt_yield_no_barrier -- - * Yield the thread of control. Don't set any memory barriers as this may hide memory - * synchronization errors in the surrounding code. It's not explicitly documented that yielding - * without a memory barrier is safe, so this function should only be used for testing in - * diagnostic mode. - */ -void -__wt_yield_no_barrier(void) WT_GCC_FUNC_ATTRIBUTE((visibility("default"))) -{ -#ifndef HAVE_DIAGNOSTIC - __wt_abort(NULL); -#endif - sched_yield(); -} diff --git a/src/third_party/wiredtiger/src/os_win/os_yield.c b/src/third_party/wiredtiger/src/os_win/os_yield.c index 60cbc09cd94..70615f2b4ae 100644 --- a/src/third_party/wiredtiger/src/os_win/os_yield.c +++ b/src/third_party/wiredtiger/src/os_win/os_yield.c @@ -24,19 +24,3 @@ __wt_yield(void) SwitchToThread(); } - -/* - * __wt_yield_no_barrier -- - * Yield the thread of control. Don't set any memory barriers as this may hide memory - * synchronization errors in the surrounding code. It's not explicitly documented that yielding - * without a memory barrier is safe, so this function should only be used for testing in - * diagnostic mode. - */ -void -__wt_yield_no_barrier(void) WT_GCC_FUNC_ATTRIBUTE((visibility("default"))) -{ -#ifndef HAVE_DIAGNOSTIC - __wt_abort(NULL); -#endif - SwitchToThread(); -} diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml index 9833ad5402d..6459920f4ac 100755 --- a/src/third_party/wiredtiger/test/evergreen.yml +++ b/src/third_party/wiredtiger/test/evergreen.yml @@ -168,7 +168,7 @@ functions: mkdir -p cmake_build cd cmake_build $CMAKE -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_v4_clang.cmake -DCMAKE_C_FLAGS="-ggdb" -DWITH_PIC=1 \ - -DHAVE_DIAGNOSTIC=1 ${NON_BARRIER_DIAGNOSTIC_YIELDS|} -DCMAKE_BUILD_TYPE=ASan \ + -DHAVE_DIAGNOSTIC=1 -DCMAKE_BUILD_TYPE=ASan \ -DHAVE_BUILTIN_EXTENSION_LZ4=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 ${configure_python_setting|} \ -G "${cmake_generator|Ninja}" ../. fi @@ -187,7 +187,7 @@ functions: mkdir -p cmake_build cd cmake_build $CMAKE -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mongodbtoolchain_v3_gcc.cmake -DCMAKE_C_FLAGS="-ggdb" -DWITH_PIC=1 \ - -DHAVE_DIAGNOSTIC=1 ${NON_BARRIER_DIAGNOSTIC_YIELDS|} -DENABLE_STRICT=1 \ + -DHAVE_DIAGNOSTIC=1 -DENABLE_STRICT=1 \ -DHAVE_BUILTIN_EXTENSION_LZ4=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 ${configure_python_setting|} \ -G "${cmake_generator|Ninja}" ../. fi @@ -2680,60 +2680,6 @@ tasks: name: recovery-stress-test-3 tags: ["stress-test-3", "stress-test-zseries-3"] - - name: format-stress-test-no-barrier - tags: ["stress-test-no-barrier"] - exec_timeout_secs: 25200 - commands: - - func: "get project" - - func: "compile wiredtiger with builtins" - vars: - NON_BARRIER_DIAGNOSTIC_YIELDS: -DNON_BARRIER_DIAGNOSTIC_YIELDS=1 - - func: "format test script" - vars: - format_test_script_args: -e "SEGFAULT_SIGNALS=all" -b "catchsegv ./t" -t 360 - - - name: format-stress-sanitizer-test-no-barrier - tags: ["stress-test-no-barrier"] - exec_timeout_secs: 25200 - commands: - - func: "get project" - - func: "compile wiredtiger address sanitizer" - vars: - NON_BARRIER_DIAGNOSTIC_YIELDS: -DNON_BARRIER_DIAGNOSTIC_YIELDS=1 - - func: "format test script" - vars: - format_test_script_args: -t 360 - test_env_vars: - ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1" - ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer - - - name: race-condition-stress-sanitizer-test-no-barier - tags: ["stress-test-no-barrier"] - exec_timeout_secs: 25200 - commands: - - func: "get project" - - func: "compile wiredtiger" - vars: - posix_configure_flags: -DENABLE_STRICT=1 -DHAVE_DIAGNOSTIC=1 -DNON_BARRIER_DIAGNOSTIC_YIELDS=1 -DHAVE_BUILTIN_EXTENSION_LZ4=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 -DHAVE_BUILTIN_EXTENSION_ZSTD=1 - - func: "format test script" - vars: - format_test_script_args: -R -t 360 - test_env_vars: - ASAN_OPTIONS="detect_leaks=1:abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1" - ASAN_SYMBOLIZER_PATH=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer - - - name: recovery-stress-test-no-barrier - tags: ["stress-test-no-barrier"] - exec_timeout_secs: 25200 - commands: - - func: "get project" - - func: "compile wiredtiger" - vars: - posix_configure_flags: -DENABLE_STRICT=1 -DHAVE_DIAGNOSTIC=1 -DNON_BARRIER_DIAGNOSTIC_YIELDS=1 -DHAVE_BUILTIN_EXTENSION_LZ4=1 -DHAVE_BUILTIN_EXTENSION_SNAPPY=1 -DHAVE_BUILTIN_EXTENSION_ZLIB=1 - - func: "recovery stress test script" - vars: - times: 25 - - name: format-abort-recovery-stress-test commands: # Allow 30 minutes beyond test runtime because recovery under load can cause the test to @@ -3856,7 +3802,6 @@ buildvariants: - name: ".stress-test-2" - name: ".stress-test-3" - name: ".stress-test-4" - - name: ".stress-test-no-barrier" - name: format-abort-recovery-stress-test - name: ubuntu2004-stress-tests-arm64 @@ -3895,7 +3840,6 @@ buildvariants: - name: ".stress-test-2" - name: ".stress-test-3" - name: ".stress-test-4" - - name: ".stress-test-no-barrier" - name: format-abort-recovery-stress-test - name: ubuntu2004-perf-tests |