[Bug 1885012] Re: Provide libc6-lse binary package optimized for Large System Extensions (LSE)

Balint Reczey 1885012 at bugs.launchpad.net
Wed Mar 24 16:59:15 UTC 2021


** Description changed:

  [Impact]
  
  * libc6 is not using LSE atomics even on capable HW causing poor
  performance in heavily threaded application
  
  [Test Case]
  
  * install libc6-lse on capable arm64
  * verify that the library is in use:
  $ strace -eopenat ls
  openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/atomics/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/atomics/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/atomics/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
  * Compile and run the attached a.c test program and observe it running much faster on high (>= 8) core count capable HW than with the standard libc6 package.
  
  [Regression Potential]
  
  * The libraries in libc6-lse can't be run on not LSE capable HW and trying to use them results in crashes due to the illegal instructions. The fix includes proper checking for HW capabilities and selecting the libraries in /lib/aarch64-linux-gnu/atomics/ only when LSE instructions are supported.
  * The package build can also fail when trying to run tests of libc6-lse on not LSE capable HW but this is avoided by detecting LSE instructions and running the tests only if the HW supports them.
  * Initramfs-tools could break when generating intramfs when the new libc6-lse package is installed (LP: #1880853), but this regression is fixed in initramfs-tools and Breaks: is added against affected initramfs-tools versions.
+ * Upgrading libc6-lse packge to a newer version breaks on systems with LSE support (LP: #1912652).
  
  [Other Info]

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1885012

Title:
  Provide libc6-lse binary package optimized for Large System Extensions
  (LSE)

Status in glibc package in Ubuntu:
  Fix Released
Status in glibc source package in Bionic:
  Fix Released

Bug description:
  [Impact]

  * libc6 is not using LSE atomics even on capable HW causing poor
  performance in heavily threaded application

  [Test Case]

  * install libc6-lse on capable arm64
  * verify that the library is in use:
  $ strace -eopenat ls
  openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/atomics/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/atomics/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
  openat(AT_FDCWD, "/lib/aarch64-linux-gnu/atomics/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
  * Compile and run the attached a.c test program and observe it running much faster on high (>= 8) core count capable HW than with the standard libc6 package.

  [Regression Potential]

  * The libraries in libc6-lse can't be run on not LSE capable HW and trying to use them results in crashes due to the illegal instructions. The fix includes proper checking for HW capabilities and selecting the libraries in /lib/aarch64-linux-gnu/atomics/ only when LSE instructions are supported.
  * The package build can also fail when trying to run tests of libc6-lse on not LSE capable HW but this is avoided by detecting LSE instructions and running the tests only if the HW supports them.
  * Initramfs-tools could break when generating intramfs when the new libc6-lse package is installed (LP: #1880853), but this regression is fixed in initramfs-tools and Breaks: is added against affected initramfs-tools versions.
  * Upgrading libc6-lse packge to a newer version breaks on systems with LSE support (LP: #1912652).

  [Other Info]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1885012/+subscriptions



More information about the foundations-bugs mailing list