diff options
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-server-Adjust-the-cache-alignment-assumptions.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-server-Adjust-the-cache-alignment-assumptions.patch new file mode 100644 index 0000000000..bf083c85f4 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-server-Adjust-the-cache-alignment-assumptions.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 5c9e0d0fc9188bab0ae09c9c33df01938b0c1b6c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 14 Apr 2022 09:25:33 -0700 | ||
4 | Subject: [PATCH] server: Adjust the cache alignment assumptions | ||
5 | |||
6 | aarch64 has 256 for hardware_destructive_interference_size and gcc 12 | ||
7 | has added a warning to complain about mismatches which results in | ||
8 | static_assert failures | ||
9 | |||
10 | In file included from src/mongo/s/commands/cluster_find_cmd.cpp:39: | ||
11 | src/mongo/db/stats/counters.h:185:47: error: static assertion failed: cache line spill | ||
12 | 185 | static_assert(sizeof(decltype(_together)) <= stdx::hardware_constructive_interference_size, | ||
13 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
14 | |||
15 | The structure need to ensure true sharing for both the elements | ||
16 | so align it to hardware_constructive_interference_size instead | ||
17 | |||
18 | Upstream-Status: Reported [https://jira.mongodb.org/browse/SERVER-65664] | ||
19 | |||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | --- | ||
22 | src/mongo/db/stats/counters.h | 6 +++--- | ||
23 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
24 | |||
25 | --- a/src/mongo/db/stats/counters.h | ||
26 | +++ b/src/mongo/db/stats/counters.h | ||
27 | @@ -182,8 +182,8 @@ private: | ||
28 | AtomicWord<long long> requests{0}; | ||
29 | }; | ||
30 | CacheAligned<Together> _together{}; | ||
31 | - static_assert(sizeof(decltype(_together)) <= stdx::hardware_constructive_interference_size, | ||
32 | - "cache line spill"); | ||
33 | + static_assert(sizeof(Together) <= stdx::hardware_constructive_interference_size, | ||
34 | + "cache line spill"); | ||
35 | |||
36 | CacheAligned<AtomicWord<long long>> _logicalBytesOut{0}; | ||
37 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb index 310a0aa38e..7ea728aad4 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb | |||
@@ -31,6 +31,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \ | |||
31 | file://ppc64_ARCH_BITS.patch \ | 31 | file://ppc64_ARCH_BITS.patch \ |
32 | file://PTHREAD_STACK_MIN.patch \ | 32 | file://PTHREAD_STACK_MIN.patch \ |
33 | file://0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch \ | 33 | file://0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch \ |
34 | file://0001-server-Adjust-the-cache-alignment-assumptions.patch \ | ||
34 | " | 35 | " |
35 | SRC_URI:append:libc-musl ="\ | 36 | SRC_URI:append:libc-musl ="\ |
36 | file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ | 37 | file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ |