Ubuntu 11.04: Support AMD Bulldozer processor - glibc (memset)

Bug #735020 reported by harsha jagasia
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eglibc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Feature description:
Backport patch to pick SSE2 version of x86-64 memset on AMD Bulldozer to Ubuntu 11.04 glibc.

Partner benefit:
memset shows up significantly in the profile of major apps and benchmarks.
Since several Linux compilers like gcc, open64 etc rely on distribution glibc for string routines, this would make a significant difference to software performance readiness of AMD's upcoming Bulldozer processors.
We are observing a 14% to 54% improvement in cycle counts for the SSE2 version of x86-64 memset compared to the integer version, for blocks between 144B and 8K. glibc trunk dispatches to integer version of memset on Bulldozer currently in trunk. The patch below fixes that.

This patch also fixes the following bug in x86-64 memset - Currently for misaligned blocks > 144B, based on the misalignment, memset code jumps into the integer code path even if the startup code explicitly chooses SSE2 for a processor.

Development status:
Submitted to mailing list.

Upstream submission link with upstream submission status:
Submitted at http://sourceware.org/ml/libc-alpha/2011-03/msg00006.html

Matthias Klose (doko)
affects: glibc (Ubuntu) → eglibc (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package eglibc - 2.13-0ubuntu5

---------------
eglibc (2.13-0ubuntu5) natty; urgency=low

  * Enable SSE2 memset for AMD's upcoming Orochi processor and bugfix.
    LP: #735020.
 -- Matthias Klose <email address hidden> Mon, 14 Mar 2011 21:35:41 +0100

Changed in eglibc (Ubuntu):
status: New → Fix Released
Revision history for this message
harsha jagasia (harsha-jagasia) wrote :

We looked at machine with Ubuntu 11.04 on it. And it looks like __memset_sse2 is not really avalaible in a dump of the glibc at /lib/x86_64-linux-gnu/libc.so.6. Nor is __memcpy_ssse3 avalaible. In fact, none of the symbols with _sse* suffix are avalaible. Does Ubuntu use glibc or eglibc? If glibc is used, is it built with --enable-multiarch. Without the *_sse* routines, we expect glibc performance to be quite hindered on both AMD Barcelona (Greyhound core) and AMD Orochi (Bulldozer core) machines.

Revision history for this message
Colin Watson (cjwatson) wrote :

We had to turn off these optimisations on x86_64 systems due to bug 727064. They'll be re-enabled in Ubuntu 11.10 when we switch to glibc 2.14.

Revision history for this message
harsha jagasia (harsha-jagasia) wrote :

Turning off all SSEx routines for an issue with one routine (memcpy) will hurt performance quite a bit. Why not just stay at glibc 2.12 (with the memset changes we submitted to trunk) which will result in better performance and also deal with the memcpy issue? Or is the window for that closed?

Revision history for this message
Matthias Klose (doko) wrote :

that window was closed when uploading 2.13 into natty.

Revision history for this message
Matthias Klose (doko) wrote :

you can find (after it's built) an eglibc version with the patch reverted in:

  https://launchpad.net/~ubuntu-toolchain-r/+archive/ppa

Add to your sources.list:

deb http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu natty main
deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu natty main

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.