!911 [sync] PR-899: cleancode, remove some oe patches which already fixed in upstream
From: @openeuler-sync-bot Reviewed-by: @liqingqing_1229 Signed-off-by: @liqingqing_1229
This commit is contained in:
commit
57116719ae
34
glibc.spec
34
glibc.spec
@ -67,7 +67,7 @@
|
||||
##############################################################################
|
||||
Name: glibc
|
||||
Version: 2.38
|
||||
Release: 38
|
||||
Release: 39
|
||||
Summary: The GNU libc libraries
|
||||
License: %{all_license}
|
||||
URL: http://www.gnu.org/software/glibc/
|
||||
@ -226,29 +226,18 @@ Patch135: nptl-Use-support-check.h-facilities-in-tst-setuid3.patch
|
||||
#openEuler patch list
|
||||
Patch9000: turn-default-value-of-x86_rep_stosb_threshold_form_2K_to_1M.patch
|
||||
Patch9001: locale-delete-no-hard-link-to-avoid-all_language-pac.patch
|
||||
#Patch9002: 0001-add-base-files-for-libphtread-condition-family.patch
|
||||
#Patch9003: 0002-add-header-files-for-libphtread_2_17_so.patch
|
||||
#Patch9004: 0003-add-build-script-and-files-of-libpthread_2_17_so.patch
|
||||
#Patch9005: 0004-add-two-header-files-with-some-deleted-macros.patch
|
||||
#Patch9006: 0005-add-pthread-functions_h.patch
|
||||
#Patch9007: 0006-add-elsion-function-which-moved-to-libc-in-glibc-2.34.patch
|
||||
#Patch9008: 0007-add-lowlevellock_2_17_c.patch
|
||||
#Patch9009: 0008-add-pause_nocancel_2_17.patch
|
||||
#Patch9010: 0009-add-unwind-with-longjmp.patch
|
||||
Patch9011: use-region-to-instead-of-country-for-extract-timezon.patch
|
||||
Patch9012: malloc-use-__get_nprocs-replace-__get_nprocs_sched.patch
|
||||
Patch9013: x86-use-total-l3cache-for-non_temporal_threshold.patch
|
||||
Patch9014: strcmp-delete-align-for-loop_aligned.patch
|
||||
Patch9015: add-pthread_cond_clockwait-GLIBC_2_28.patch
|
||||
Patch9016: add-GB18030-2022-charmap-BZ-30243.patch
|
||||
Patch9017: fix-Segmentation-fault-in-nss-module.patch
|
||||
Patch9018: fix_nss_database_check_reload_and_get_memleak.patch
|
||||
Patch9019: 0001-fix-glibc-build-error-on-x86.patch
|
||||
Patch9002: use-region-to-instead-of-country-for-extract-timezon.patch
|
||||
Patch9003: strcmp-delete-align-for-loop_aligned.patch
|
||||
Patch9004: add-pthread_cond_clockwait-GLIBC_2_28.patch
|
||||
Patch9005: add-GB18030-2022-charmap-BZ-30243.patch
|
||||
Patch9006: fix-Segmentation-fault-in-nss-module.patch
|
||||
Patch9007: fix_nss_database_check_reload_and_get_memleak.patch
|
||||
Patch9008: 0001-fix-glibc-build-error-on-x86.patch
|
||||
|
||||
%if %{ENABLE_RELOC}
|
||||
Patch9021: reserve-relocation-information-for-sysboost.patch
|
||||
Patch9009: reserve-relocation-information-for-sysboost.patch
|
||||
%endif
|
||||
Patch9022: add-Wl-z-noseparate-code-for-so.patch
|
||||
Patch9010: add-Wl-z-noseparate-code-for-so.patch
|
||||
|
||||
Provides: ldconfig rtld(GNU_HASH) bundled(gnulib)
|
||||
|
||||
@ -1454,6 +1443,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Sep 20 2024 Qingqing Li <liqingqing3@huawei.com> - 2.38-39
|
||||
- clean code, remove some oe patches which already fixed in upstream
|
||||
|
||||
* Mon Sep 9 2024 Qingqing Li <liqingqing3@huawei.com> - 2.38-38
|
||||
- nptl: Use <support/check.h> facilities in tst-setuid3
|
||||
- posix: Use <support/check.h> facilities in tst-truncate and tst-truncate64
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 0ba0f3c749211d2888ee310b2b58ff6401eae624 Mon Sep 17 00:00:00 2001
|
||||
From 506e47da1d66b33e24440a495eeef85daf7f2a78 Mon Sep 17 00:00:00 2001
|
||||
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
Date: Wed, 11 Oct 2023 13:43:56 -0300
|
||||
Subject: [PATCH] malloc: Use __get_nprocs on arena_get2 (BZ 30945)
|
||||
@ -20,10 +20,11 @@ Reviewed-by: DJ Delorie <dj@redhat.com>
|
||||
(cherry picked from commit 472894d2cfee5751b44c0aaa71ed87df81c8e62e)
|
||||
---
|
||||
include/sys/sysinfo.h | 4 ----
|
||||
malloc/arena.c | 2 +-
|
||||
misc/getsysstats.c | 6 ------
|
||||
sysdeps/mach/getsysstats.c | 6 ------
|
||||
sysdeps/unix/sysv/linux/getsysstats.c | 2 +-
|
||||
4 files changed, 1 insertion(+), 17 deletions(-)
|
||||
5 files changed, 2 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/include/sys/sysinfo.h b/include/sys/sysinfo.h
|
||||
index c490561581..65742b1036 100644
|
||||
@ -40,6 +41,19 @@ index c490561581..65742b1036 100644
|
||||
/* Return number of physical pages of memory in the system. */
|
||||
extern long int __get_phys_pages (void);
|
||||
libc_hidden_proto (__get_phys_pages)
|
||||
diff --git a/malloc/arena.c b/malloc/arena.c
|
||||
index 6f03955ff2..82b09adb47 100644
|
||||
--- a/malloc/arena.c
|
||||
+++ b/malloc/arena.c
|
||||
@@ -820,7 +820,7 @@ arena_get2 (size_t size, mstate avoid_arena)
|
||||
narenas_limit = mp_.arena_max;
|
||||
else if (narenas > mp_.arena_test)
|
||||
{
|
||||
- int n = __get_nprocs_sched ();
|
||||
+ int n = __get_nprocs ();
|
||||
|
||||
if (n >= 1)
|
||||
narenas_limit = NARENAS_FROM_NCORES (n);
|
||||
diff --git a/misc/getsysstats.c b/misc/getsysstats.c
|
||||
index 5f36adc0e8..23cc112074 100644
|
||||
--- a/misc/getsysstats.c
|
||||
@ -88,5 +102,5 @@ index b0b6c154ac..1ea7f1f01f 100644
|
||||
{
|
||||
enum
|
||||
--
|
||||
2.23.0
|
||||
2.33.0
|
||||
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From f5545d74d6dc4d5036bee6a91cda14a51e2a0676 Mon Sep 17 00:00:00 2001
|
||||
From: Yang Yanchao <yangyanchao6@huawei.com>
|
||||
Date: Sat, 12 Mar 2022 15:30:17 +0800
|
||||
Subject: [PATCH] malloc: use __get_nprocs replace __get_nprocs_sched.
|
||||
|
||||
---
|
||||
malloc/arena.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/malloc/arena.c b/malloc/arena.c
|
||||
index f1f0af86..66748463 100644
|
||||
--- a/malloc/arena.c
|
||||
+++ b/malloc/arena.c
|
||||
@@ -879,7 +879,7 @@ arena_get2 (size_t size, mstate avoid_arena)
|
||||
narenas_limit = mp_.arena_max;
|
||||
else if (narenas > mp_.arena_test)
|
||||
{
|
||||
- int n = __get_nprocs_sched ();
|
||||
+ int n = __get_nprocs ();
|
||||
|
||||
if (n >= 1)
|
||||
narenas_limit = NARENAS_FROM_NCORES (n);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
From af0606f5d626b92d6e59da3a797548e9daab5580 Mon Sep 17 00:00:00 2001
|
||||
From: Qingqing Li <liqingqing3@huawei.com>
|
||||
Date: Sat, 25 Jun 2022 15:36:44 +0800
|
||||
Subject: [PATCH] x86: use total l3cache for non_temporal_threshold
|
||||
|
||||
Below glibc upstream patch modified the default behavoir for large size of memcpy,
|
||||
such as 1M~10M. revert it and use GLIBC_TUNABLES="glibc.cpu.x86_non_temporal_threshold=xxx"
|
||||
to tune the application when needed.
|
||||
|
||||
d3c57027470b78dba79c6d931e4e409b1fecfc80
|
||||
Author: Patrick McGehearty <patrick.mcgehearty@oracle.com>
|
||||
Date: Mon Sep 28 20:11:28 2020 +0000
|
||||
|
||||
Reversing calculation of __x86_shared_non_temporal_threshold
|
||||
|
||||
The __x86_shared_non_temporal_threshold determines when memcpy on x86
|
||||
uses non_temporal stores to avoid pushing other data out of the last
|
||||
level cache.
|
||||
uses non_temporal stores to avoid pushing other data out of the last
|
||||
level cache.
|
||||
|
||||
This patch proposes to revert the calculation change made by H.J. Lu's
|
||||
patch of June 2, 2017.
|
||||
|
||||
H.J. Lu's patch selected a threshold suitable for a single thread
|
||||
getting maximum performance. It was tuned using the single threaded
|
||||
large memcpy micro benchmark on an 8 core processor. The last change
|
||||
changes the threshold from using 3/4 of one thread's share of the
|
||||
cache to using 3/4 of the entire cache of a multi-threaded system
|
||||
before switching to non-temporal stores. Multi-threaded systems with
|
||||
more than a few threads are server-class and typically have many
|
||||
active threads. If one thread consumes 3/4 of the available cache for
|
||||
all threads, it will cause other active threads to have data removed
|
||||
from the cache. Two examples show the range of the effect. John
|
||||
McCalpin's widely parallel Stream benchmark, which runs in parallel
|
||||
and fetches data sequentially, saw a 20% slowdown with this patch on
|
||||
an internal system test of 128 threads. This regression was discovered
|
||||
when comparing OL8 performance to OL7. An example that compares
|
||||
normal stores to non-temporal stores may be found at
|
||||
https://vgatherps.github.io/2018-09-02-nontemporal/. A simple test
|
||||
shows performance loss of 400 to 500% due to a failure to use
|
||||
nontemporal stores. These performance losses are most likely to occur
|
||||
when the system load is heaviest and good performance is critical.
|
||||
|
||||
The tunable x86_non_temporal_threshold can be used to override the
|
||||
default for the knowledgable user who really wants maximum cache
|
||||
allocation to a single thread in a multi-threaded system.
|
||||
The manual entry for the tunable has been expanded to provide
|
||||
more information about its purpose.
|
||||
|
||||
modified: sysdeps/x86/cacheinfo.c
|
||||
modified: manual/tunables.texi
|
||||
---
|
||||
sysdeps/x86/dl-cacheinfo.h | 4 ++++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h
|
||||
index e6c94dfd..c5e8deb3 100644
|
||||
--- a/sysdeps/x86/dl-cacheinfo.h
|
||||
+++ b/sysdeps/x86/dl-cacheinfo.h
|
||||
@@ -926,6 +926,10 @@ dl_init_cacheinfo (struct cpu_features *cpu_features)
|
||||
if (tunable_size != 0)
|
||||
shared = tunable_size;
|
||||
|
||||
+ /* keep x86 to use the same non_temporal_threshold like glibc2.28 */
|
||||
+ if (threads != 0)
|
||||
+ non_temporal_threshold *= threads;
|
||||
+
|
||||
tunable_size = TUNABLE_GET (x86_non_temporal_threshold, long int, NULL);
|
||||
if (tunable_size > minimum_non_temporal_threshold
|
||||
&& tunable_size <= maximum_non_temporal_threshold)
|
||||
--
|
||||
2.30.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user