How to enable or disable Hardware Lock Elision
This document (7022289) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 15 Service Pack 5 (SLES 15 SP5)
SUSE Linux Enterprise Server 15 Service Pack 4 (SLES 15 SP4)
SUSE Linux Enterprise Server 15 Service Pack 3 (SLES 15 SP3)
SUSE Linux Enterprise Server 15 Service Pack 2 (SLES 15 SP2)
SUSE Linux Enterprise Server 15 Service Pack 1 (SLES 15 SP1)
SUSE Linux Enterprise Server 15 (SLES 15)
SUSE Linux Enterprise Server 12 Service Pack 5 (SLES 12 SP5)
SUSE Linux Enterprise Server 12 Service Pack 4 (SLES 12 SP4)
SUSE Linux Enterprise Server 12 Service Pack 3 (SLES 12 SP3)
SUSE Linux Enterprise Server 12 Service Pack 2 (SLES 12 SP2)
SUSE Linux Enterprise Server 12 Service Pack 1 (SLES 12 SP1)
SUSE Linux Enterprise Server 12 (SLES 12)
Situation
In glibc versions prior to 2.27, Hardware Lock Elision is enabled by default. This affects all SLES12 versions and SLES15 versions up to and including SLES 15 SP2.
Some applications running on SUSE Linux Enterprise Server, may require that the 'Hardware Lock Elision' functionality is disabled or enabled, depending on the version of glibc being used.
Resolution
Hardware Lock Elision should be enabled on a per-process basis using an environment variable e.g.
export GLIBC_TUNABLES="glibc.elision.enable=1"
How to disable Hardware Lock Elision in versions of glibc prior to 2.27
Temporary solution: Add the appropriate noelision path statement to the beginning of the library load path (LD_LIBRARY_PATH) so that the noelision libraries are used in preference to any others appearing later in the path
e.g. export LD_LIBRARY_PATH=/lib64/noelision/:$LD_LIBRARY_PATH
On server reboot, this change will be lost.
Permanent solution: Create file /etc/ld.so.conf.d/noelision.conf
Add the appropriate line: e.g. /lib64/noelision
After saving the noelision.conf changes, run `ldconfig` to rebuild caches.
Cause
One reason to disable Hardware Lock Elision, is because of a bug in some Intel CPUs which does not handle the Hardware Lock Elision correctly.
Additional Information
With glibc version 2.27 and later, there are several tunables available to control the behavior of elision on supported platforms. For further information see:
https://www.gnu.org/software/libc/manual/html_node/Elision-Tunables.html
With glibc versions prior to 2.27, two different versions of the libpthread library are supplied. The version of the library with Hardware Lock Elision enabled, is in the usual library locations, /lib and /lib64. The version of the library that has Hardware Lock Elision disabled is found here:-
32-Bit /lib/noelision
64-Bit /lib64/noelision
NOTE: Make sure that /etc/ld.so.conf includes the /etc/ld.so.conf.d/ directory (default) or add the directory you want to be included (the directory where you placed the noelision.conf file) * it is recommended to keep everything under /etc/ld.so.conf.d/
NOTE: The files present in the directories listed in /etc/ld.so.conf are applied in alpha-numerical file name order. You need to be aware of what is in each file, in each of the included directories, to make sure that the desired settings are being applied and not 'overwritten' or ignored.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7022289
- Creation Date: 08-Nov-2017
- Modified Date:20-Jun-2024
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com