[Merge] ~daxtens/ubuntu/+source/glibc:xenial-math-perf-regression-1663280 into ubuntu/+source/glibc:ubuntu/xenial-devel

Andreas Hasenack andreas at canonical.com
Tue Nov 6 12:00:05 UTC 2018


You have been requested to review the proposed merge of ~daxtens/ubuntu/+source/glibc:xenial-math-perf-regression-1663280 into ubuntu/+source/glibc:ubuntu/xenial-devel.

For more details, see:
https://code.launchpad.net/~daxtens/ubuntu/+source/glibc/+git/glibc/+merge/356779

xenial: Fix performance regression with mixed AVX/SSE code
    
      * debian/patches/ubuntu/xsave-part1.diff and
        debian/patches/ubuntu/xsave-part2.diff: Fix a serious performance
        regression when mixing SSE and AVX code on certain processors.
        The patches are from the upstream 2.23 stable branch. (LP: #1663280)

PPA: ppa:daxtens/glibc-xsave-1663280

Steps to test: 
[see LP: #1663280]

You need an affected chip. I have been using an Azure VM with the following:

Vendor ID:             GenuineIntel
CPU family:            6
Model:                 85
Model name:            Intel(R) Xeon(R) Platinum 8168 CPU @ 2.70GHz

Create the following C file, exp.c:

#include <math.h>
#include <stdio.h>

int main () {
  double a, b;
  for (a = b = 0.0; b < 2.0; b += 0.00000005) a += exp(b);
  printf("%f\n", a);
  return 0;
}

$ gcc -O3 -march=x86-64 -o exp exp.c -lm

With the current version of glibc:

$ time ./exp
...
real 0m1.349s
user 0m1.349s

$ time LD_BIND_NOW=1 ./exp
...
real 0m0.625s
user 0m0.621s

Observe that LD_BIND_NOW makes a big difference as it avoids the call to _dl_runtime_resolve.

With the proposed update:

$ time ./exp
...
real 0m0.625s
user 0m0.621s

$ time LD_BIND_NOW=1 ./exp
...

real 0m0.631s
user 0m0.631s

Observe that the normal case is faster, and LD_BIND_NOW makes a negligible difference.

Package Test Results:

autopkgtest [15:45:55]: test rebuild: -----------------------]
rebuild              PASS
autopkgtest [15:45:56]: test rebuild:  - - - - - - - - - - results - - - - - - - - - -
autopkgtest [15:45:57]: @@@@@@@@@@@@@@@@@@@@ summary
rebuild              PASS

Also, with this patch, on both an affected and an unaffected system, the following things were tested to still work:

 * Boot with the upgraded libc6.

 * Watch a youtube video in Firefox over VNC.

 * Build some C code (debuild of zlib).

 * Test Java by installing and running Eclipse.


-- 
Your team Ubuntu Sponsors Team is requested to review the proposed merge of ~daxtens/ubuntu/+source/glibc:xenial-math-perf-regression-1663280 into ubuntu/+source/glibc:ubuntu/xenial-devel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 28200 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-sponsors/attachments/20181106/633fc2e0/attachment-0001.diff>


More information about the Ubuntu-sponsors mailing list