This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Mon, 30 Apr 2018 11:33:55 -0400
- Subject: Re: aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT
- Autocrypt: addr=carlos at redhat dot com; prefer-encrypt=mutual; keydata= xsFNBFef5BoBEACvJ15QMMZh4stKHbz0rs78XsOdxuug37dumTx6ngrDCwZ61k7nHQ+uxLuo QvLSc6YJGBEfiNFbs1hvhRFNR7xJbzRYmin7kJZZ/06fH2cgTkQhN0mRBP8KsKKT+7SvvBL7 85ZfAhArWf5m5Tl0CktZ8yoG8g9dM4SgdvdSdzZUaWBVHc6TjdAb9YEQ1/jpyfHsQp+PWLuQ ZI8nZUm+I3IBDLkbbuJVQklKzpT1b8yxVSsHCyIPFRqDDUjPL5G4WnUVy529OzfrciBvHdxG sYYDV8FX7fv6V/S3eL6qmZbObivIbLD2NbeDqw6vNpr+aehEwgwNbMVuVfH1PVHJV8Qkgxg4 PqPgQC7GbIhxxYroGbLJCQ41j25M+oqCO/XW/FUu/9x0vY5w0RsZFhlmSP5lBDcaiy3SUgp3 MSTePGuxpPlLVMePxKvabSS7EErLKlrAEmDgnUYYdPqGCefA+5N9Rn2JPfP7SoQEp2pHhEyM 6Xg9x7TJ+JNuDowQCgwussmeDt2ZUeMl3s1f6/XePfTd3l8c8Yn5Fc8reRa28dFANU6oXiZf 7/h3iQXPg81BsLMJK3aA/nyajRrNxL8dHIx7BjKX0/gxpOozlUHZHl73KhAvrBRaqLrr2tIP LkKrf3d7wdz4llg4NAGIU4ERdTTne1QAwS6x2tNa9GO9tXGPawARAQABzSlDYXJsb3MgTydE b25lbGwgPGNhcmxvc0BzeXN0ZW1oYWx0ZWQub3JnPsLBgQQTAQIAK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aHydnuCaK69JemZYiMiWLdZqzicbpAJidHSA ibHNRWhRbl/5Vl7TzYVDjJI=
- Openpgp: preference=signencrypt
- References: <1d8eb765-e147-534e-ed1e-daa8deb8d5a7@arm.com>
On 04/19/2018 07:51 AM, Szabolcs Nagy wrote:
> This enables searching shared libraries in atomics/ when the hardware
> supports LSE atomics of armv8.1 so one can provide optimized variants
> of libraries in a portable way.
>
> LSE atomics does not affect library abi, the new instructions can
> interoperate with old ones.
>
> I'm not familiar with how this feature of the dynamic linker is used
> in practice by distros or others so comments are welcome.
>
> 2018-04-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
>
> * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (HWCAP_IMPORTANT): Add
> HWCAP_ATOMICS.
This is your choice to enable, but you must convince downstream
distributions that it makes sense.
Adhemerval's technical comments are on point regarding the patch and
I'd follow his advice, though as you say one dir for each uarch is probably
not the right fit for AArch64.
Really, this is the "age old" question of building a multilib variant of
an architecture and compiling for a specific ISA or ISA extension.
If you turn this on, beware of the additional costs and complications, as
I commented downthread:
https://www.sourceware.org/ml/libc-alpha/2018-04/msg00624.html
For distributions the key technical metric for deciding to multilib
is performance.
What performance improvements do you see when you inline the 8.1 LSE
atomics? Across one application? Across the system? Across different
workloads?
Does that performance translate into real-world gains?
The cost to a distro is not insubstantial, it is additional errata/QE
(bodhi), requirements for more ARM hardware (8.1 LSE) to test upon,
build routing requirements to route all builds to the new hardware
for automated testing (koji), additional boxes for CI exposure
(koeshi), etc. etc.
Each distro must balance the value this brings against the cost to
the users and customers.
Your job is going to be to convince them that the performance is so
good that it outweighs the costs.
I'm excited to be convinced :-)
--
Cheers,
Carlos.