RFC: pentium optimized debian
There was some talk on the list a few months ago about whether a
pentium optimized version of debian makes sense. Some points against are
- pentium optimized binaries tend to be bigger
- only some packages will benefit from pentium optimization
Some points in favor are that:
- pentium optimized binaries of things that are CPU bound tend to be at
least 10% faster by my benchmarks. Stampede linux claims 10 - 30% speed
- PR value.
I propose a compromise: instead of splitting off a whole new
pentium architecture, which would double building time, etc, we just set up
a small collection of pentium optimized .debs. This could be organized on
the ftp site as a directory tree with many symlinks back to i386 packages,
and a few pentium optimized debs.
I've already hacked together a system to enable building of
pentium optimized packages with egcc, and have built most of the base
system, plus a few extras like libc6, and xaos. I've been using these
packages for a few days, and have discovered no problems. If anyone would
like to try it, you can download them from
http://kitenet.net/~joey/pentium/OK/ (28.8 line, sorry!)
The main change I had to make was a modification to dpkg to make it
support a new tag, Optimization:, in binary package files. This tag simply
tells what version of an architecture a package was built optimized for, and
is optional. If the tag exists, its value is used in determining the package
name (so we can have xaos_3.0-3_pentium.deb for example). And of course, you
can see it when querying dpkg for info about a package.
There needs to be a way to signal the build process that the
system is surrently building a package with a given level of optimization.
This could be accomplished in a variety of ways, like a new flag to
dpkg-buildpackage, an environment variable, a config file, etc.
This is the detail I'm most uncertian about. It could easily be implmented
as a new flag in dpkg-buildpackage and dpkg-genchanges. In my
implementation, I decided to use an environment variable, since it is also
used by my pentium-builder package to force egcc to use -mpentium
optimization. Plus, it's easy to implment. So if DEBIAN_OPTIMIZATION is set,
the value of that environment variable populates the Optimization: tag. This
means that building a pentium optimized package is as easy as
"DEBIAN_OPTIMIZATION=pentium dpkg-buildpackage -rfakeroot".
I had to modify dpkg-gencontrol to recognize this new variable and
use it when generating the control file and debian/files.
dpkg-name and dpkg-deb --build also needed modification, so that
they look for the Optimization: tag and if it is present, use it instead
of the architecture when determining what filename to name the .deb as.
I made a small modification to dpkg-scanpackages, so it includes the
Optimization tag in the Packages file.
I've uploaded dpkg version 126.96.36.199.1 to experimental with these
changes in it.
I have left out at least one thing - the .changes files will need to
have some way to specifiy to dinstall that the uploaded files are for a
given subarch. I don't know enough about dinstall to know how this would
work. It might be sufficient to let dinstall figure out which packages go
where by looking at their filenames.
see shy jo
 I've created a package called pentium-builder, now in experimental, that
diverts gcc, cc, g++, etc, with shell scripts that call egcs with the
flag "-m$DEBIAN_OPTIMIZATION" if DEBIAN_OPTIMIZATION is set. It's a hack,
but it works.
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org