splite-gentoo posted <[EMAIL PROTECTED]>,
excerpted below,  on Fri, 02 Sep 2005 14:33:22 -0500:

> Actually, what I want is a 32-bit x86 userland with a 64-bit kernel and
> multilib'd gcc, bintools, and glibc.  In other words, a 32-bit userland
> that my users can still compile and run their 64-bit number crunchers on.
> They don't need 64-bit X11, KDE, GNOME, etc.  They do, however, want their
> Flash and Acroread plugins to work.
> 
> Anyone have a way of doing this that doesn't involve wholesale plundering
> of binaries from an amd64 box?  []  Or am I the only one who thinks this
> is a pretty neat idea (digital watches notwithstanding)?

Disclaimer, I'm a Gentoo AMD64 user, not a dev...

It's a neat idea, but might not be quite the "best of both worlds" you
may well believe you are getting.  Perhaps you are aware of the following
and believe full 32-bit compatibility is easier (if a bit more hassle due
to the "by hand" you mention).  If so, great, be it far from me to say
you have it wrong when I don't know the specifics of your installation; if
not, a slightly different alternative, as explained, might be better, and
certainly easier given that you wouldn't have the "by hand" stuff.  Even
if you still want a mostly 32-bit userland, there's a solution below that
should be less hassle than what you describe as your current one.

In general, you are quite correct, 64-bit doesn't normally offer that much
other than flatter memory access and better number crunching in certain
situations.  On pretty much any bi-arch other than amd64, your solution
would be perfect.

However, the x86/amd64 performance difference is somewhat larger than
that, due to x86 architectural peculiarities.  The biggest of these is
x86's relative lack of named registers, as compared to other modern
architectures.  64-bit AMD64 addresses this weakness by adding additional
registers.  However, for compatibility reasons, these registers aren't
available in 32-bit mode, only in 64-bit mode.

The result is that while (admittedly pulling numbers out of the air for
demonstration's sake, the argument is sound, do your own research on
specific numbers, if desired) 60 or 70 percent of apps on most archs would
get little benefit from switching to 64-bit, but would instead actually
lose performance due to the additional memory requirements of 64-bit over
32-bit, on AMD64, the same 60 or 70 percent will likely see improvements,
despite the larger working size and memory requirements, due to use of the
additional registers. Efficiency can be increased somewhat further with
-frename-registers and similar tricks to make better use of all available
registers.

Due primarily to the "register factor", it thus makes better sense to run
a general 64-bit userland than it might on other platforms, and this is
what Gentoo for AMD64 is designed for, for the most part.  Gentoo AMD64's
multilib setup makes it possible to run the 32-bit binary-only apps, and
from-source 32-bit apps with 32-bit binary-only codecs and plugins, that
you may need, while at the same time being designed "out of the box" (or
should that be "from the profile"??) to run a general 64-bit userland
where 32-bit is /not/ necessary, because that's generally most efficient
for the reasons explained above.

Note, however, that  you still have a couple of options, one of which
would end up pretty close to what you describe, only without the "by hand"
hassle you have at the moment.

The normal profile and setup is designed, as already mentioned, to
emphasize 64-bit.  However, on top of that, while it enables 32-bit, it is
designed to emphasize minimal-maintenance-hassle 32-bit, over maximum
run-time-efficency 32-bit.  A number of the 32-bit compatibility libraries
are by default binaries, of less optimization than normal, because they
are designed to run on both ia64 (Itanium) and amd64.  Likewise with the
32-bit binary applications such as mozilla-firefox-bin, if you choose to
install them.

Note that due to portage limitations (it can't track 32-bit and 64-bit
dependencies separately at this time) it's not wise to use the 64-bit
system-wide portage to install 32-bit stuff (other than the 32-bit
binary-only stuff).  However, you still have options...

For those that want optimized 32-bit, the recommended solution is to run a
32-bit chroot.  There are instructions in the amd64 technotes, but the
idea is that after you set up your 64-bit system, you setup a 32-bit
chroot.  In it, you setup a 32-bit profile and generally emerge anything
you want 32-bit, including all dependencies, in that profile.  Because
you are running a separate 32-bit only copy of portage, with its own
database, in the chroot, it won't interfere with the 64-bit main system
copy.

Now, normally, one would still run a mostly 64-bit system, including
whatever system daemons (cron, syslog, etc) and general applications one
would normally be running, presumably only merging applications that had
32-bit-binary-only dependencies (along with the from-source
dependencies, in 32-bit form as well) in the chroot.  However, there's
really nothing stopping you from merging and running most of your system
as 32-bit, with the 64-bit "main" system being only a minimal base, if
that's what you prefer.  Given the "register factor" above, however, IMUO
(U=user), it still makes more sense to run the general system as 64-bit,
on amd64, and only run 32-bit where necessary for compatibility reasons.  
However, that's just "MUO" and "YUO" may well be quite different.  Since
it's your boxen we are talking about, it's "YUO" that applies. =8^)

Finally, this should have really been posted to the amd64 list, not the
devel list, thus not bothering all the devels who don't do AMD64.  There
are many there, both users and devs, quite willing to help, and it's
certainly more a topic for there than for here.  So... while Gentoo devs
are usually pretty nice about answering anyway, and I'm replying here as
well so maybe they won't have to and can keep doing the good things they
do as devs bringing us all those nice ebuilds to play with =8^), please...
for any followups and for next time, post gentoo-amd64 questions to the
gentoo-amd64 list, OK? That's what it's there for.  =8^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html


-- 
gentoo-dev@gentoo.org mailing list

Reply via email to