V2 [PATCH 0/4] ld.so: Add --list-tunables to print tunable values
H.J. Lu
hjl.tools@gmail.com
Fri Sep 18 16:07:05 GMT 2020
Tunable values and their minimum/maximum values are invisible to users.
This patch set adds --list-tunables to ld.so to print tunable values
with their minimum and maximum values. For these tunables whose values
and minimum/maximum values are determinted at run-time, TUNABLE_SET_ALL
and TUNABLE_SET_ALL_FULL are added to update tunable values together with
their minimum and maximum values.
--list-tunables works on i686 and x86-64. Please test --list-tunables on
your native processors. users/hjl/tunable/master branch at:
https://gitlab.com/x86-glibc/glibc/-/commits/users/hjl/tunable/master
contains the same set of patches.
On x86, to make cache info accessible to --list-tunables, they are moved
to cpu_features in ld.so. CPU features are initialized by DL_PLATFORM_INIT
in dynamic executable and by ARCH_INIT_CPU_FEATURES in static executable.
To initialize CPU features and cache info when loading ld.so and libc.so
inside of static executable, also initialize them by dummy function
pointers via IFUNC relocation like other fields in _rtld_global_ro in
ld.so.
H.J. Lu (4):
x86: Initialize CPU info via IFUNC relocation [BZ 26203]
Set tunable value as well as min/max values
x86: Move x86 processor cache info to cpu_features
ld.so: Add --list-tunables to print tunable values
NEWS | 2 +
elf/Makefile | 8 +
elf/dl-tunables.c | 53 +-
elf/dl-tunables.h | 20 +-
elf/rtld.c | 31 +-
manual/README.tunables | 24 +-
manual/tunables.texi | 37 ++
sysdeps/i386/dl-machine.h | 3 +-
sysdeps/x86/cacheinfo.c | 873 ++-------------------------
sysdeps/x86/cpu-cacheinfo.c | 922 +++++++++++++++++++++++++++++
sysdeps/x86/cpu-features.c | 25 +-
sysdeps/x86/dl-get-cpu-features.c | 25 +-
sysdeps/x86/include/cpu-features.h | 23 +
sysdeps/x86_64/dl-machine.h | 3 +-
14 files changed, 1198 insertions(+), 851 deletions(-)
create mode 100644 sysdeps/x86/cpu-cacheinfo.c
--
2.26.2
More information about the Libc-alpha
mailing list