Gentoo Archives: gentoo-amd64

From: Simon Strandman <simon.strandman@×××××.com>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] x86_64 optimization patches for glibc.
Date: Sat, 23 Jul 2005 14:49:32
Message-Id: 42E258A7.5080501@telia.com
1 Hi!
2
3 Some binary distros like Mandrake and suse patches their glibcs with
4 x86_64 optimized strings and an x86_64 optimized libm to improve
5 performance.
6
7 I tried extracting those patches from an mandrake SRPM and add them to
8 the glibc 2.3.5 ebuild. The x86_64 optimized strings patch built and
9 worked perfectly and gave a large speedup as you can see below. But I
10 couldn't get glibc to build with the libm patch because of unresolved
11 symbols (and I'm no programmer so I have no idea how to fix that).
12
13 I found a small C program on a suse mailing-list to measure glibc memory
14 copy performance:
15 http://lists.suse.com/archive/suse-amd64/2005-Mar/0220.html
16
17 With the glibc 2.3.5 currently in gentoo I get:
18 isidor ~ # ./memcpy 2200 1000 1048576
19 Memory to memory copy rate = 1291.600098 MBytes / sec. Block size = 1048576.
20
21 But with glibc 2.3.5 + amd64 optimized strings I get:
22 isidor ~ # ./memcpy 2200 1000 1048576
23 Memory to memory copy rate = 2389.321777 MBytes / sec. Block size = 1048576.
24
25 That's an improvement of over 1000mb/s! Suse 9.3 also gives about
26 2300mb/s out of the box.
27
28 How about adding these patches to gentoo? Perhaps in glibc 2.3.5-r1
29 before it leaves package.mask? I'll create a bugreport about it if you
30 agree!
31
32 This .tar.bz2 contains the glibc directory from my overlay with the
33 mandrake patches included in files/mdk, but the libm patches are
34 commented out in the ebuild.
35 http://snigel.no-ip.com/~nxsty/linux/glibc.tar.bz2
36
37 --
38 Simon Strandman <simon.strandman@×××××.com>
39
40 --
41 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] x86_64 optimization patches for glibc. Allan Wang <allanvv@×××××.com>
Re: [gentoo-amd64] x86_64 optimization patches for glibc. Sean Johnson <gutenpress@×××××.com>
Re: [gentoo-amd64] x86_64 optimization patches for glibc. Matt Randolph <mattr@×××××.com>
Re: [gentoo-amd64] x86_64 optimization patches for glibc. Jeremy Huddleston <eradicator@g.o>
Re: [gentoo-amd64] x86_64 optimization patches for glibc. ardour <ardour@×××××××.be>