From: Peter Bergner <bergner@vnet.ibm.com>
To: "Brian D. Carlstrom" <bdc@carlstrom.com>
Cc: Olof Johansson <olof@lixom.net>,
'linuxppc-dev list' <linuxppc-dev@ozlabs.org>,
'Paul Mackerras' <paulus@samba.org>,
Steve Munroe <sjmunroe@us.ibm.com>
Subject: Re: AltiVec in the kernel
Date: Fri, 21 Jul 2006 17:21:48 -0500 [thread overview]
Message-ID: <1153520508.17144.46.camel@localhost.localdomain> (raw)
In-Reply-To: <lezmf4j5ym.wl%bdc@carlstrom.com>
On Thu, 2006-07-20 at 14:56 -0700, Brian D. Carlstrom wrote:
> At Thu, 20 Jul 2006 14:05:23 -0500, Olof Johansson wrote:
> > http://penguinppc.org/dev/glibc/glibc-powerpc-cpu-addon.html
>
> Very interesting. According to that page, the memcpy optimizations seem
> to be using 64-bit operations and that 128-bit AltiVec operations are
> still being solicited.
>
> I was encouraged to see the following:
>
> If you need to build generic distributions (supporting several
> <cpu_types>) you can leverage the dl_procinfo support built into
> glibc. This mechanism allows for multiple versions of the core
> libraries (libc, libm, librt, libpthread, libpthread_db) to be
> stored in hardware/platform specific subdirectories under /lib[64].
Actually, this support is not limited to the core glibc routines or
the system lib directors /lib/ and /usr/lib/. This works just as well
for third party shipped libraries in their own library trees as the
following example (on a power5 box) shows:
bergner@vervainp1:~/cpu-tuned-libs> pwd
/home/bergner/cpu-tuned-libs
bergner@vervainp1:~/cpu-tuned-libs> ls lib/ lib/power5/
lib/:
libfoo.so power5/
lib/power5/:
libfoo.so
bergner@vervainp1:~/cpu-tuned-libs> gcc
-L/home/bergner/cpu-tuned-libs/lib -R/home/bergner/cpu-tuned-libs/lib
main.c -lfoo
bergner@vervainp1:~/cpu-tuned-libs> ldd a.out
linux-vdso32.so.1 => (0x00100000)
libfoo.so => /home/bergner/cpu-tuned-libs/lib/power5/libfoo.so
(0x0ffde000)
libc.so.6 => /lib/power5/libc.so.6 (0x0fe69000)
/lib/ld.so.1 (0xf7fe1000)
bergner@vervainp1:~/cpu-tuned-libs> ./a.out
Loaded the optimzed lib
bergner@vervainp1:~/cpu-tuned-libs> rm lib/power5/libfoo.so
bergner@vervainp1:~/cpu-tuned-libs> ldd a.out
linux-vdso32.so.1 => (0x00100000)
libfoo.so => /home/bergner/cpu-tuned-libs/lib/libfoo.so
(0x0ffde000)
libc.so.6 => /lib/power5/libc.so.6 (0x0fe69000)
/lib/ld.so.1 (0xf7fe1000)
bergner@vervainp1:~/cpu-tuned-libs> ./a.out
Loaded the unoptimzed lib
The runtime loader magic uses the AT_PLATFORM string value as
the subdirectory to search in under the .../lib/ or .../lib64/
library directory. To find out what your AT_PLATFORM value is
on your current box, you can do:
bergner@vervainp1:~/cpu-tuned-libs> LD_SHOW_AUXV=1 /bin/true
AT_DCACHEBSIZE: 0x80
AT_ICACHEBSIZE: 0x80
AT_UCACHEBSIZE: 0x0
AT_SYSINFO_EHDR: 0x100000
AT_HWCAP: power5 mmu fpu ppc64 ppc32
AT_PAGESZ: 4096
AT_CLKTCK: 100
AT_PHDR: 0x10000034
AT_PHENT: 32
AT_PHNUM: 9
AT_BASE: 0xf7fe1000
AT_FLAGS: 0x0
AT_ENTRY: 0x10000980
AT_UID: 1001
AT_EUID: 1001
AT_GID: 100
AT_EGID: 100
AT_SECURE: 0
AT_PLATFORM: power5
> However, I'm guessing this addon is not something found in common
> distributions for PowerPC like Debian, Fedora, Gentoo, Ubuntu, ...
At last years GCC Developers Summit, one of the Ubuntu guys mentioned
he was interested in adding it to Ubuntu. I haven't heard whether that
has shown up yet though. It will be available in upcoming SUSE and
Red Hat enterprise distros. I don't know about the others. As Olof
mentioned, it can take some lead time for this to get picked up.
There's also the question of how many and which processors a distro
will ship cpu optimized libraries for. Given all of the PowerPC
variants, they obviously can ship optimized libs for everything.
Peter
next prev parent reply other threads:[~2006-07-21 22:21 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-18 12:48 AltiVec in the kernel Matt Sealey
2006-07-18 13:53 ` Kumar Gala
2006-07-18 15:10 ` Matt Sealey
2006-07-18 17:56 ` Paul Mackerras
2006-07-19 18:10 ` Linas Vepstas
2006-07-19 18:19 ` Paul Mackerras
2006-07-19 18:38 ` Johannes Berg
2006-07-19 18:57 ` Linas Vepstas
2006-07-20 12:31 ` Matt Sealey
2006-07-20 13:23 ` Kumar Gala
2006-07-20 13:33 ` Matt Sealey
2006-07-20 17:42 ` Linas Vepstas
2006-07-20 18:47 ` Brian D. Carlstrom
2006-07-20 19:05 ` Olof Johansson
2006-07-20 21:56 ` Brian D. Carlstrom
2006-07-20 22:39 ` Daniel Ostrow
2006-07-21 6:35 ` Olof Johansson
2006-07-21 14:42 ` Matt Sealey
2006-07-21 16:51 ` Linas Vepstas
2006-07-21 18:08 ` Matt Sealey
2006-07-22 3:09 ` Segher Boessenkool
2006-07-23 13:28 ` Matt Sealey
2006-07-23 21:37 ` Benjamin Herrenschmidt
2006-07-21 18:46 ` Brian D. Carlstrom
2006-07-21 21:30 ` Hollis Blanchard
2006-07-21 22:21 ` Peter Bergner [this message]
2006-07-18 18:39 ` Benjamin Herrenschmidt
2006-07-18 17:43 ` Paul Mackerras
-- strict thread matches above, loose matches on Subject: below --
2009-12-11 11:45 Simon Richter
2009-12-11 15:49 ` Arnd Bergmann
2009-12-16 22:11 ` Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1153520508.17144.46.camel@localhost.localdomain \
--to=bergner@vnet.ibm.com \
--cc=bdc@carlstrom.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
--cc=paulus@samba.org \
--cc=sjmunroe@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).