This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2216554 - glibc: Debug GLIBC_TUNABLES=glibc.cpu.hwcaps=
Summary: glibc: Debug GLIBC_TUNABLES=glibc.cpu.hwcaps=
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: glibc
Version: 8.6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: glibc team
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-21 19:27 UTC by Paulo Andrade
Modified: 2023-07-06 15:02 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-06 15:01:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-721 0 None None None 2023-07-06 15:01:53 UTC
Red Hat Issue Tracker RHELPLAN-160396 0 None None None 2023-06-21 19:32:51 UTC
Sourceware 30583 0 P2 NEW RFE: Export all IFUNCs as @GLIBC_PRIVATE symbols to support overrides via audtior (LD_AUDIT) 2023-06-26 16:16:17 UTC

Description Paulo Andrade 2023-06-21 19:27:49 UTC
Debugging setting these flags very early is not very easy.

What is a good approach, for example, attempting to disable AVX, with
several approaches in the pattern:

$ GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX,-AVX2,-AVX_Usable /lib64/ld-2.28.so --list-diagnostics|grep -i AVX
env[0x0]="GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX,-AVX2,-AVX_Usable"
x86.cpu_features.preferred.AVX_Fast_Unaligned_Load=0x1
x86.cpu_features.preferred.Prefer_No_AVX512=0x1
x86.cpu_features.preferred.MathVec_Prefer_No_AVX512=0x0

The desired trest is, for example, to get x86.cpu_features.preferred.AVX_Fast_Unaligned_Load set to zero.

This request is to help an user to experiment with forcing glibc to choose __memcpy_ssse3_back (as was done in rhel7) instead of __memcpy_avx_unaligned_erms

Tried several combinations from the switch in sysdeps/x86/cpu-tunables.c
and could not find a good pattern to experiment. Note that info libc
shows an incorrect path to check for possible values.

The main request is to be able to experiment with different ifunc patterns
for benchmark purposes.

Comment 1 Paulo Andrade 2023-06-23 15:25:10 UTC
This appears to cause it to use the alternate memcpy.

GLIBC_TUNABLES="glibc.cpu.hwcaps=Fast_Copy_Backward,SSSE3,-Fast_Unaligned_Copy,-Fast_Unaligned_Load,-ERMS,-Prefer_ERMS,-AVX,-AVX_Usable,-AVX_Fast_Unaligned_Load"

Comment 9 Florian Weimer 2023-07-06 13:46:05 UTC
I am going to move this bug over to Jira. A link to issues.redhat.com should appear in due course. If you cannot access this ticket, feel free to ask for assistance here.


Note You need to log in before you can comment on or make changes to this bug.