From 3b1f6ca3fc7bc5e7fb305aeca91e93b0e82fe855 Mon Sep 17 00:00:00 2001 From: zhangjian Date: Thu, 6 Nov 2025 22:33:56 +0800 Subject: [PATCH 1/2] add back delete patch Signed-off-by: zhangjian --- glibc.spec | 6 +++- strcmp-delete-align-for-loop_aligned.patch | 32 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 strcmp-delete-align-for-loop_aligned.patch diff --git a/glibc.spec b/glibc.spec index 4745d43..d531007 100644 --- a/glibc.spec +++ b/glibc.spec @@ -67,7 +67,7 @@ ############################################################################## Name: glibc Version: 2.38 -Release: 82 +Release: 83 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -418,6 +418,7 @@ Patch9038: backport-Fix-UB-on__dl_map_object_from_fd.patch Patch9039: backport-Fix-handling-of-symbol-versions-which-hash-to-zero.patch Patch9040: 0024-Sw64-Change-libdir-from-lib-to-lib64.patch Patch9041: AArch64-modify_the_SVE_memcpy_implementation_for_32-byte_aligned_access.patch +Patch9042: strcmp-delete-align-for-loop_aligned.patch Provides: ldconfig rtld(GNU_HASH) bundled(gnulib) @@ -1604,6 +1605,9 @@ fi %endif %changelog +* Thu Nov 21 2025 zhangjian - 2.38-83 +- delete align for align_loop + * Wed Nov 19 2025 Qingqing Li - 2.38-82 - AArch64: Optimise SVE scalar callbacks diff --git a/strcmp-delete-align-for-loop_aligned.patch b/strcmp-delete-align-for-loop_aligned.patch new file mode 100644 index 0000000..cf5b15a --- /dev/null +++ b/strcmp-delete-align-for-loop_aligned.patch @@ -0,0 +1,32 @@ +From 9bbffed83b93f633b272368fc536a4f24e9942e6 Mon Sep 17 00:00:00 2001 +From: Yang Yanchao +Date: Mon, 21 Feb 2022 14:25:25 +0800 +Subject: [PATCH] strcmp: delete align for loop_aligned + +In Kunpeng-920, the performance of strcmp deteriorates only +when the 16 to 23 characters are different.Or the string is +only 16-23 characters.That shows 2 misses per iteration which +means this is a branch predictor issue indeed. +In the preceding scenario, strcmp performance is 300% worse than expected. + +Fortunately, this problem can be solved by modifying the alignment of the functions. +--- + sysdeps/aarch64/strcmp.S | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/sysdeps/aarch64/strcmp.S b/sysdeps/aarch64/strcmp.S +index f225d718..7a048b66 100644 +--- a/sysdeps/aarch64/strcmp.S ++++ b/sysdeps/aarch64/strcmp.S +@@ -71,8 +71,6 @@ ENTRY(strcmp) + b.ne L(misaligned8) + cbnz tmp, L(mutual_align) + +- .p2align 4 +- + L(loop_aligned): + ldr data2, [src1, off2] + ldr data1, [src1], 8 +-- +2.33.0 + -- Gitee From 83a53ecbb7d16d4bd53f9d059a7590aa87618244 Mon Sep 17 00:00:00 2001 From: panzhe0328 Date: Thu, 20 Nov 2025 15:24:33 +0800 Subject: [PATCH 2/2] Fixed benchtest result file overwriting (cherry picked from commit a48d3d35479e77c93885de259ae7ec7dddf50463) --- bench.mk | 2 +- glibc.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bench.mk b/bench.mk index dfe46bd..28c8741 100644 --- a/bench.mk +++ b/bench.mk @@ -45,9 +45,9 @@ bench-set: $(binaries-benchset) bench-malloc: $(binaries-bench-malloc) run=$(objpfx)bench-malloc-thread; \ - outfile=$(prefix)/$$(basename $${run}.$(ver).out); \ for thr in 1 8 16 32; do \ echo "Running $${run} $${thr}"; \ + outfile=$(prefix)/$$(basename $${run}-$${thr}.$(ver).out); \ $(run-bench) $${thr} > $${outfile}.tmp; \ mv $${outfile}{.tmp,}; \ done diff --git a/glibc.spec b/glibc.spec index d531007..d372aa3 100644 --- a/glibc.spec +++ b/glibc.spec @@ -67,7 +67,7 @@ ############################################################################## Name: glibc Version: 2.38 -Release: 83 +Release: 84 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -1605,7 +1605,10 @@ fi %endif %changelog -* Thu Nov 21 2025 zhangjian - 2.38-83 +* Thu Nov 20 2025 panzhe - 2.38-84 +- benchtest: Fixed benchtest result file overwriting + +* Thu Nov 20 2025 zhangjian - 2.38-83 - delete align for align_loop * Wed Nov 19 2025 Qingqing Li - 2.38-82 -- Gitee