From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1EBPAL-000809-Ev for garchives@archives.gentoo.org; Sat, 03 Sep 2005 03:58:06 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j833sgUI007752; Sat, 3 Sep 2005 03:54:42 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j833r1ld022250 for ; Sat, 3 Sep 2005 03:53:01 GMT Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by smtp.gentoo.org with esmtp (Exim 4.43) id 1EBP84-0007r0-JE for gentoo-dev@lists.gentoo.org; Sat, 03 Sep 2005 03:55:44 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EBP7n-0005FZ-Qx for gentoo-dev@gentoo.org; Sat, 03 Sep 2005 05:55:27 +0200 Received: from ip68-230-97-182.ph.ph.cox.net ([68.230.97.182]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Sep 2005 05:55:27 +0200 Received: from 1i5t5.duncan by ip68-230-97-182.ph.ph.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Sep 2005 05:55:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Duncan <1i5t5.duncan@cox.net> Subject: [gentoo-dev] Re: combining x86 and amd64 Date: Fri, 02 Sep 2005 20:54:34 -0700 Organization: Sometimes Message-ID: References: <20050901171028.GW18440@bmb24.uth.tmc.edu> <200509011923.58239@enterprise.flameeyes.is-a-geek.org> <43173BBD.3020704@gentoo.org> <43173D96.9030701@gentoo.org> <20050902193322.GB2116@sigint.cs.purdue.edu> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ip68-230-97-182.ph.ph.cox.net User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table) Sender: news X-Archives-Salt: 4a7c68d7-39b5-415c-87b0-2f86a9013560 X-Archives-Hash: 3186cb837acb916a162d87f21786da28 splite-gentoo posted <20050902193322.GB2116@sigint.cs.purdue.edu>, 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