[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: subarchitectures

Camm Maguire wrote:

> Greetings!  The good news is that in days, we should have some
> optimized atlas blas libraries for a variety of recent processors.
> The challenge is how to adapt the package -- when built on an Athlon,
> PIII, and PII, the resulting binaries will run only on those
> subarchitectures, (and much faster!)


> I suppose all binaries could be
> included in the package, and only the appropriate one installed, but
> how does this jive with the automatic build daemons?  Such a package
> would have to be partially built on several different machines.  On
> the other hand, I could have several different packages, each of which
> would build only on a given subarch, and would produce a distinct
> package name.  That might not work so well with automated build
> daemons either.

I remember reading in a recent email (debian-mentors?) that ldconfig and ld.so
under glibc 2.2 look into subarch-specific directories, e.g. /usr/lib/i586,
/usr/lib/i686, etc. before looking in /usr/lib.  So if you could build with say
-mcpu=i686 and the PIII asm flags and install that in /usr/lib/i686, then
rebuild the package with -mcpu=i586 and say MMX but not newer instructions,
you'd have a much larger package which would be optimized in a lot of places!

The problem with having, say, postinst determine the local subarch and only
installing the appropriate lib is that it fails on CPU change.  The above
approach (building for all of the targets and installing all of the libs) would
be disk-intensive, but easy on the end-users- they'd just need to install
"atlas2" and ld.so would make it always work optimally.

The other approach, like what you've outlined, would have a single source
package build all of the separate binary packages by repeatedly cleaning and
building.  This would save disk space vs. what I have above, but would be a pain
for those who wanted to build from source (building would take forever), but the
autobuilders should like it, and it wouldn't be too hard on the end-users:
installing a package requiring "atlas2" would present them with the choice of
atlas2-386, atlas2-pentium, atlas2-athlon, etc.  And you'd have to tailor it by
processor family, e.g. Alpha builds ev4, ev5, ev56, ev6, ev67; PPC builds 601,
603, 603e, 604, 604e, 750, Altivec... okay, this gets really ugly really fast!

Unfortunately, I'm not sure how fine the subarches are, e.g. PII and PIII are
both i686 but may have separate /usr/lib/xxx subdirs, and I don't know the docs
well enough to tell you where to find this info. :-(

So that's what I know.

-Adam P.

              Welcome to the best software in the world today cafe!

Reply to: