Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 534350 - sys-libs/glibc-2.20 slow on AMD Bulldozer
Summary: sys-libs/glibc-2.20 slow on AMD Bulldozer
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/git/gitweb.cgi...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-01-02 15:45 UTC by Eric Grüttefien
Modified: 2015-02-17 08:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to disable avx on amds buldozer family (buldozer_no_avx.patch,1.09 KB, patch)
2015-01-02 15:45 UTC, Eric Grüttefien
Details | Diff
[PATCH][BZ #17801] Fix memcpy regression (mcpy.patch,684 bytes, patch)
2015-01-28 13:23 UTC, Eric Grüttefien
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Grüttefien 2015-01-02 15:45:42 UTC
Created attachment 392966 [details, diff]
patch to disable avx on amds buldozer family

After an update i recognized very slow qt apps.

Fist i thought, radeonsi drivers  are blame the for that.

But after some debuging i found that perf top shows __memcpy_avx_unaligned with a 80& hit ratio. So glibc was eating al the cpu.

After digging some more i've read that avx is supported on AMD's Bulldozer architecture but much slower than SSE equivalents.

So i patched glibc not to use avx. And .. Hey all back to normal.

I've wrote a patch with a additional check to Amd's Bulldozer which disables avx.

Please add this patch to glibc patches for glibc-2.20 ebuild.

Maybe we should open an upstream bug report also.

qt's raster enginge is unusable without it.
A mouse over background highlighting needs 2 seconds to happen.....
I've tested it with VirtualBox.
Comment 1 Manuel Rüger (RETIRED) gentoo-dev 2015-01-22 23:46:48 UTC
Is this related? https://sourceware.org/ml/libc-alpha/2015-01/msg00087.html
Comment 2 Eric Grüttefien 2015-01-23 09:39:47 UTC
https://sourceware.org/ml/libc-alpha/2015-01/msg00087.html could match. I saw that __memcpy_avx_unaligned was the function who it up the cpu.

Should i try to the proposed patch ?
Comment 3 Manuel Rüger (RETIRED) gentoo-dev 2015-01-26 16:01:29 UTC
(In reply to Eric Grüttefien from comment #2)
> https://sourceware.org/ml/libc-alpha/2015-01/msg00087.html could match. I
> saw that __memcpy_avx_unaligned was the function who it up the cpu.
> 
> Should i try to the proposed patch ?

Please do try it out, so toolchain herd can apply that patch.
Comment 4 Eric Grüttefien 2015-01-28 13:23:01 UTC
Created attachment 395048 [details, diff]
[PATCH][BZ #17801] Fix memcpy regression
Comment 5 Eric Grüttefien 2015-01-28 13:23:40 UTC
The mentioned patch [BZ #17801] works also.
Comment 6 SpanKY gentoo-dev 2015-02-09 16:05:04 UTC
this has been fixed in glibc-2.21

we probably should roll it into glibc-2.20 though since it'd be easy
Comment 7 SpanKY gentoo-dev 2015-02-17 08:09:13 UTC
fix is also in glibc-2.20-r2 now