Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2216554

Summary: glibc: Debug GLIBC_TUNABLES=glibc.cpu.hwcaps=
Product: Red Hat Enterprise Linux 8 Reporter: Paulo Andrade <pandrade>
Component: glibcAssignee: glibc team <glibc-bugzilla>
Status: CLOSED MIGRATED QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.6CC: ashankar, codonell, dj, fweimer, mnewsome, pfrankli, sipoyare
Target Milestone: rcKeywords: FutureFeature, MigratedToJIRA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-06 15:01:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.