]> git.proxmox.com Git - ceph.git/commitdiff
add stop-gap to fix compat with CPUs not supporting SSE 4.1
authorStefan Hanreich <s.hanreich@proxmox.com>
Mon, 18 Sep 2023 15:46:56 +0000 (17:46 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 31 Oct 2023 09:46:32 +0000 (10:46 +0100)
Some of our users ran into issues with running Ceph on older CPU
architectures [1]. This is apparently due to a bug in gf-complete
paired with gcc-12, that
leads to SSE 4.1 instructions being emitted in the general code,
rather than dynamically dispatching functions using those
instructions. Those binaries then break on older CPUs that do not
support this instruction set.

I've ran some benchmarks with `rados bench` against our last release
(18.2.0-pve2) and this new version. The commands were taken from our
latest Ceph benchmarking paper [2]. The results showed that this patch
does not lead to performance regressions on newer hardware.

                  18.2.0-pve2    this patch
Read EC           4574.28        4651.95
Write EC          3739.59        3773.87
Read Replicated   5345.34        5568.41
Write Replicated  4123.28        4066.19
(numbers correspond to bandwidth in MB/s)

[1] https://forum.proxmox.com/threads/proxmox-8-ceph-quincy-monitor-no-longer-working-on-amd-opteron-2427.129613
[2] https://www.proxmox.com/en/downloads/proxmox-virtual-environment/documentation/proxmox-ve-ceph-benchmark-2020-09

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
patches/0015-fix-compatibility-with-CPUs-not-supporting-SSE-4.1-i.patch [new file with mode: 0644]
patches/series

diff --git a/patches/0015-fix-compatibility-with-CPUs-not-supporting-SSE-4.1-i.patch b/patches/0015-fix-compatibility-with-CPUs-not-supporting-SSE-4.1-i.patch
new file mode 100644 (file)
index 0000000..a44aefa
--- /dev/null
@@ -0,0 +1,32 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Stefan Hanreich <s.hanreich@proxmox.com>
+Date: Fri, 15 Sep 2023 16:55:02 +0200
+Subject: [PATCH] fix compatibility with CPUs not supporting SSE 4.1
+ instructions
+
+Building without -O1 causes gcc-12 to emit SSE 4.1 instructions which
+are not supported on older CPU architectures. This leads to Ceph
+crashing on older CPU architectures. -O1 causes those optimizations to
+be implemented manually via runtime dispatch.
+
+Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
+---
+ src/erasure-code/jerasure/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/erasure-code/jerasure/CMakeLists.txt b/src/erasure-code/jerasure/CMakeLists.txt
+index f9cd22e11..b0a355235 100644
+--- a/src/erasure-code/jerasure/CMakeLists.txt
++++ b/src/erasure-code/jerasure/CMakeLists.txt
+@@ -67,7 +67,7 @@ endif()
+ add_library(gf-complete_objs OBJECT ${gf-complete_srcs})
+ set_target_properties(gf-complete_objs PROPERTIES 
+-  COMPILE_FLAGS "${SIMD_COMPILE_FLAGS}")
++  COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -O1")
+ set_target_properties(gf-complete_objs PROPERTIES 
+   COMPILE_DEFINITIONS "${GF_COMPILE_FLAGS}")
+-- 
+2.39.2
+
index c78de02355dd707d9c65daf02f1de93ea977b7bb..df9d7baf61d889fee44d9f6f56d73a34eaa369ae 100644 (file)
@@ -12,3 +12,4 @@
 0012-fix-4759-run-ceph-crash-daemon-with-www-data-group-f.patch
 0013-d-rules-compile-with-gcc-12.patch
 0014-debian-add-missing-bcrypt-to-manager-.requires.patch
+0015-fix-compatibility-with-CPUs-not-supporting-SSE-4.1-i.patch