From: Johnny Hughes mailing-lists@hughesjr.com
Right ... but in a software capacity we are also talking about pentium, pentium mmx, cyrix i686, amd k6, via c3 that use i586 packages.
No! You _never_ want anything but a _true_ Pentium or Pentium MMX using i586. i586 ISA and/or optimization are _not_ good for anything but those 2 chips.
You want to use i686 for AMD K6, Cyrix M2 and Via C3. You want to use i486 for AMD K5 and Cyrix 6x86/M1.
This is one of the most misunderstood details in the user world.
CentOS is trying to provide limited support for them. This support doesn't in any way affect other packages like glibc.i686 or the i686 kernels ... In case someone might be concerned about a CentOS / RHEL divergence. The i586 packages are only installed on machines that have i586 processors ...
I understand that. But the point you are missing is that there are _only_2_ "i586 ISA" processors: Pentium and Pentium MMX Do not confuse "i586 class" with "i586 ISA."
I appreciate that CentOS offers these added processors, since Red Hat does not consider it their bother -- whether they only ship i486 and i686, or just i686 now (since all designs of the mid-to-late '90s are i686 ISA).
if you have i686 then that is what is installed on your machine.
I understand.
Red Hat did seem open to at least reviewing a patch to the glibc package that provides i586 support if we get it working.
And that's great. But I'm sure the marketshare is why they didn't do it themselves.
Right now, the market is: i686 ISA compatible > i486 ISA compatible > i586 ISA compatible
And it's been like that for awhile. But even before then, it's _always_ been:
i486 ISA compatible > i586 ISA compatible
i586 is not recommended, even if i686 ISA compatible typically means i586 is supported. It's just rather poor performing, and you can occassionally run into a serious instruction issue (especially with early i686 clones that did i686 fine, but not always i586).
There is _no_ "i586 clone" -- no one would purposely clone the Pentium's instruction set because it was quickly superceded by i686 for good reasons. Unfortunately, Intel took forever to get past its Pentium Pro offering, which was never designed for consumers, and finally offer an i686 for consumers in the Pentium II.
Hence why i686 clones like the AMD K6 actually pre-date much of the widespread consumer adoption of an i686 from Intel itself because the consumer chip didn't hit for years after its first ISA.
idSoftware always had excellent commentary on i586 v. i686, largely because they found some of the best hacks for i586 to get around many of its ALU design flaws.
-- Bryan J. Smith mailto:b.j.smith@ieee.org
On Mon, Jun 20, 2005 at 04:46:36PM -0500, Bryan J. Smith b.j.smith@ieee.org wrote:
Right ... but in a software capacity we are also talking about pentium, pentium mmx, cyrix i686, amd k6, via c3 that use i586 packages.
No! You _never_ want anything but a _true_ Pentium or Pentium MMX using i586. i586 ISA and/or optimization are _not_ good for anything but those 2 chips. You want to use i686 for AMD K6, Cyrix M2 and Via C3. You want to use i486 for AMD K5 and Cyrix 6x86/M1. This is one of the most misunderstood details in the user world.
I think it goes something like this: "Bu.... bigger number... bigger number faster! Want bigger number!" :)
Okay, two questions then...
a) If (some) i386 packages are being built with -march=i486 then they (possibly, I do realize there's only like 2 or 3 new instructions) won't run on a 386 anyway, will they? so shouldn't they be called .i486.rpm?
b) If i386 is basically no longer used for anything anyway, shouldn't we actually have no .386.rpm packages and instead have .486.rpm for most stuff with .486/586/686/athlon.rpm for kernel/ssl/glibc?
c) If redhat isn't supporting anything below a 686 anyway then why don't they switch all .386 packages all the way up to 686? I know the performance gain isn't stellar, but if the packages are not designed for installation on anything < 686 then there's not much point in _not_ compiling for 686 - the binary packages will be the approx same size anyway and will require the same amount of CDspace/bandwidth.
I know someone will say that those packages could be used on a non-686 class CPU, but on a non-686 class CPU you don't want to be using a recent distribution anyway, do you? I have a 350MHz Celeron (which is a 686) and it is already way to slow for any desktop/Xwindows applications (Fedora Core 2 on a Celeron 400 + 192MB ram is basically usable with a light window manager [twm], but that's about the limit). So the class of CPU's which aren't 686, but which could use RHEL4/Centos4 are very limited (aren't they?) to only a minimum core set of server applications... Anyway you get my drift... :) Comments?
Well Okay, so maybe it wasn't two :)
Cheers, MaZe
On Tue, 2005-06-21 at 09:54 +0200, Maciej Żenczykowski wrote:
Okay, two questions then... a) If (some) i386 packages are being built with -march=i486 then they (possibly, I do realize there's only like 2 or 3 new instructions) won't run on a 386 anyway, will they? so shouldn't they be called .i486.rpm?
They should. But I'm sure it's some legacy/compatibility consideration I haven't considered. Building for the i486, especially its TLB, makes a world of difference in performance.
b) If i386 is basically no longer used for anything anyway, shouldn't we actually have no .386.rpm packages and instead have .486.rpm for most stuff with .486/586/686/athlon.rpm for kernel/ssl/glibc?
That's basically what we have. AFAIK, Red Hat has been building with --march=i486 and --mtune=i686 (I said "mopt" prior and I was mistaken, it's "mtune") since RHL8.0, possibly 7.3.
I think they even switched to --mtune=pentium4 for some releases, although I have to think Red Hat is re-thinking that since Intel is moving back to the pre-P4 cores. I think that move was because Athlon seems to run P4 optimized code quite well too (BTW, I'm _not_ talking about extensions and the SSE pipes).
c) If redhat isn't supporting anything below a 686 anyway
This seems to be the case on RHEL's kernel, GLibC, etc..., but FC still seems to ship i486 compatible packages for kernel, GLibC, etc... -- although it depends.
then why don't they switch all .386 packages all the way up to 686?
Good question. I assume it's because someone _might_ want to build a i486 kernel, GLibC, etc... Besides, --mtune=i686 atop of --march=i486 does a good enough job without having to go to a completely pre-i686 incompatible --march=i686. It's almost overkill.
And then there's x86-64, which is also an arch/optimization game too (with many options that I won't get into).
I know the performance gain isn't stellar,
Well, there are significant performance gains by merely using -- march=i486 for various support (like the TLB), and then --mtune=i686 optimizes the code generation for a 2-issue MMX + 2-issue FPU which is in all Pentium Pro and forward processors.
For the most part, Intel Pentium Pro/II/III/4 i686 processors execute i486 ISA well enough, and i686 scheduler optimizations brings you very close to what you'd get out of i686 ISA, while still being i486 ISA compatible.
i586 Pentium/Pentium-MMX is quite different though. It sometimes has severe issues with its ALU/control at i486 instructions. Intel learned a lot from the design of i586 as well as Digital on the Alpha, which brought about the i686 re-design even before Pentium "taped-out." The _only_ architecture that _significantly_ benefits from specific ISA builds (and not just optimizations) is i586. i686 executes i486 ISA code quite well, especially if tuned for i686.
Most people don't realize that i586 and i686 were basically less than 2 years apart (1992 and 1994, respectively), even though they are _radically_different_ core designs -- almost done simultaneously (with an initial delay before i686). The problem is that Intel never bothered to introduce a "consumer" i686 until 3-4 years (1997+) after its debut, artificially extending the i586 consumer lifespan to 1998, when it should have died back in 1995, not even 3 years after its intro.
I'm sure that was a business decision coupled with the fact that there were serious packaging v. cost issues to resolve with the i686 design for the time. Ack, so many variables to discuss there.
but if the packages are not designed for installation on anything < 686
Just the kernel, GLibC, etc... lack pre-i686 versions in the _stock_ binary install. What Red Hat is basically saying is that they don't want to support pre-i686 ISAs, and I don't blame them.
At the same time, it would be a significant extra efforts to ensure quality if Red Hat didn't take the overwhelming majority of Fedora Core binaries versions and just ship them in RHEL as-built/tested. Rebuilding for i686 would introduce issues, for little performance gain beyond the current march=i486/mtune=i686 approach.
At least that is my "best guess."
then there's not much point in _not_ compiling for 686 - the binary packages will be the approx same size anyway and will require the same amount of CDspace/bandwidth.
I think it's more about shipping packages that have been well tested as- is in Fedora Core. Again, march=i486/mtune=i686 gets you very close.
I know someone will say that those packages could be used on a non-686 class CPU, but on a non-686 class CPU you don't want to be using a recent distribution anyway, do you?
I'm sure a major factor is the largely unified FC-RHEL inter-quality, as well as just testing in general. There's not much to gain by building with --march=i686 versus --march=i486/--mtune=i686. The reliability in re-using the build that has been tested in the "leading edge" distros (RHL/FC) for the "enterprise" distro (RHEL) outways it IMHO.
Except for the few, core packages that can make a major difference -- like the kernel, GLibC, etc..., --march=i486/--mtune=i686 brings you pretty close to --march=i686.
I have a 350MHz Celeron (which is a 686) and it is already way to slow for any desktop/Xwindows applications (Fedora Core 2 on a Celeron 400
- 192MB ram is basically usable with a light window manager [twm], but
that's about the limit). So the class of CPU's which aren't 686, but which could use RHEL4/Centos4 are very limited (aren't they?) to only a minimum core set of server applications... Anyway you get my drift... :) Comments?
You haven't seen a 500+MHz i486 ISA compatible, have you? SGS-Thompson makes them, and even Cyrix got up there on the M1 clocks (well over 300MHz, possibly 400MHz IIRC?).
Well Okay, so maybe it wasn't two :)
On Tue, 2005-06-21 at 09:54 +0200, Maciej Żenczykowski wrote:
Okay, two questions then...
a) If (some) i386 packages are being built with -march=i486 then they (possibly, I do realize there's only like 2 or 3 new instructions) won't run on a 386 anyway, will they? so shouldn't they be called .i486.rpm?
b) If i386 is basically no longer used for anything anyway, shouldn't we actually have no .386.rpm packages and instead have .486.rpm for most stuff with .486/586/686/athlon.rpm for kernel/ssl/glibc?
c) If redhat isn't supporting anything below a 686 anyway then why don't they switch all .386 packages all the way up to 686? I know the performance gain isn't stellar, but if the packages are not designed for installation on anything < 686 then there's not much point in _not_ compiling for 686 - the binary packages will be the approx same size anyway and will require the same amount of CDspace/bandwidth.
I know someone will say that those packages could be used on a non-686 class CPU, but on a non-686 class CPU you don't want to be using a recent distribution anyway, do you? I have a 350MHz Celeron (which is a 686) and it is already way to slow for any desktop/Xwindows applications (Fedora Core 2 on a Celeron 400 + 192MB ram is basically usable with a light window manager [twm], but that's about the limit). So the class of CPU's which aren't 686, but which could use RHEL4/Centos4 are very limited (aren't they?) to only a minimum core set of server applications... Anyway you get my drift... :) Comments?
Well Okay, so maybe it wasn't two :)
Well ... CentOS-4 is built with the default switches, which when building the i386 distro on a P4 machine is usually:
-m32 -march=i386 -mtune=pentium4
although on some packages, it is:
-m32 -march=i386 -mtune=i686
building for i486 or i686 might be better, but is not what RHEL does...so not what CentOS does.
The only SRPMS CentOS builds for other than .i386 targets for the .i386 distro (just like RHEL) are:
openssl, kernel, glibc
We do build both an i586 openssl and kernel ... and I am trying to build an i586 glibc as well, though the i386 glibc should work OK according to RH.
Maciej Żenczykowski wrote:
c) If redhat isn't supporting anything below a 686 anyway then why don't they switch all .386 packages all the way up to 686? I know the performance gain isn't stellar, but if the packages are not designed for installation on anything < 686 then there's not much point in _not_ compiling for 686 - the binary packages will be the approx same size anyway and will require the same amount of CDspace/bandwidth.
The key word is "support". They don't support it, but you are welcome to install it on preatty much anything from i386 to P4, and it will most likely run. The "we don't support it" here means only that if you run into trouble, you are on your own to solve it. I think Bryan was a bit wrong when it said how the packages are compiled. The options are "-m32 -march=i386 -mtune=i686" for wast majority of packages (some have different tune option). If you ever build any SRPM package, you'll clearly see that in the output. Unless Red Hat folks are manually instructing rpmbuild to use -march=i486 flag on each and every build. That combination of flags is probably the most tested one, and by far less likely to generate incorrect code than any other combination of flags.
To install on i386 or i486 you'd obviously need to build kernel yourself (for some distros, you'd also need to build i586 kernel). All other packages will work, even the quazy-i386 glibc. On i386 you will loose NPTL, and that is the only part of glibc that uses i486 instructions (the rest is compiled with -march=i386). Actually, if you list the files from i386 glibc package, you'll see it has way more branched directory structure than i686 version of package (i386 version has directory branches with additional i486, i586 and i686 optimized code).
For average package, there is almost no difference in size and performance if compiled with -march=i386 or -march=i686. The almost only part of instruction set where you would see performance benefits are instructions for implementing atomic locking and SMP. Since that stuff is handled almost exclusivly in kernel and glibc, that's why those are practically almost the only packages with dedicated i686 version (plus openssl libraries, that seem to benefit from i686 instruction set too).
On Tue, Jun 21, 2005 at 09:54:08AM +0200, Maciej Żenczykowski wrote:
a) If (some) i386 packages are being built with -march=i486 then they (possibly, I do realize there's only like 2 or 3 new instructions) won't run on a 386 anyway, will they? so shouldn't they be called .i486.rpm?
This is highly, highly theoretical, since I don't think there's very many machines anywhere in the world with a i386 ISA and enough memory to boot CentOS.
c) If redhat isn't supporting anything below a 686 anyway then why don't they switch all .386 packages all the way up to 686? I know the performance gain isn't stellar, but if the packages are not designed for installation on anything < 686 then there's not much point in _not_ compiling for 686 - the binary packages will be the approx same size anyway and will require the same amount of CDspace/bandwidth.
Not worth the bother. In a few years, everything will be x86_64.
On Tue, 2005-06-21 at 08:47 -0400, Matthew Miller wrote:
This is highly, highly theoretical, since I don't think there's very many machines anywhere in the world with a i386 ISA and enough memory to boot CentOS.
Not even embedded cores from a almost decade ago use less than an i486 ISA compatible. Don't forget embedded, because there _are_ "Pentium II class" (500MHz) cores that _are_ only i486 ISA compatible.
Not worth the bother. In a few years, everything will be x86_64.
x86/PAE36 will continue for a long, long time -- be it embedded or in virtual machines (in the near future of virtual cores).
x86/PAE36 will continue for a long, long time -- be it embedded or in virtual machines (in the near future of virtual cores).
That's a good point - does anyone know what the new Intel Virtualization thingamajig in the new dual core pentium D's is about? As in is it worth anything? Will it allow a dual simultaneous boot of Linux+WinXP+MaxOS under Xen or something along those lines? Even on an SMP machine? Anyone have any experience/knowledge about this? What level of CPU/hardware(?) does the virt-core support? And is the virt-core 32bit?
Cheers, MaZe.
On Tue, Jun 21, 2005 at 01:46:36AM +0000, Bryan J. Smith b.j.smith@ieee.org wrote:
Right ... but in a software capacity we are also talking about pentium, pentium mmx, cyrix i686, amd k6, via c3 that use i586 packages.
You want to use i686 for AMD K6, Cyrix M2 and Via C3.
I read a web page that suggested that in some cases software built for "i686" would not in fact work on Via C3 processors (this is near & dear to my heart since i just bought a motherboard based on one). The C3 is definitely a modern platform - it's not fast by modern standards but it works well enough for many applications and its heat/power requirements are wonderful (circa 10 watts).
The discussion suggested that the "cmov" instruction was the problem. According to this page this instruction is optional according to whatever spec there is of what it takes to be an i686, but that often "i686" code includes this instruction. I've seen other stuff that suggested that newer gcc versions had corrected this.
Anyone know for sure?
I, of course, had similar upgrade problems to the original poster. I don't really care about the performance optimizations from "i386" to "i686" as long as i'll continue to have something that works.
One additional interesting data point. The CentOS 4.0 installer gave me the "i586" glibc and the "i686" kernel. I would hope that this would be consistent.
danno -- dan pritts - systems administrator - internet2 734/352-4953 office 734/834-7224 mobile
On Tue, 2005-06-21 at 12:33 -0400, Dan Pritts wrote:
On Tue, Jun 21, 2005 at 01:46:36AM +0000, Bryan J. Smith b.j.smith@ieee.org wrote:
Right ... but in a software capacity we are also talking about pentium, pentium mmx, cyrix i686, amd k6, via c3 that use i586 packages.
You want to use i686 for AMD K6, Cyrix M2 and Via C3.
I read a web page that suggested that in some cases software built for "i686" would not in fact work on Via C3 processors (this is near & dear to my heart since i just bought a motherboard based on one). The C3 is definitely a modern platform - it's not fast by modern standards but it works well enough for many applications and its heat/power requirements are wonderful (circa 10 watts).
The discussion suggested that the "cmov" instruction was the problem. According to this page this instruction is optional according to whatever spec there is of what it takes to be an i686, but that often "i686" code includes this instruction. I've seen other stuff that suggested that newer gcc versions had corrected this.
Anyone know for sure?
I, of course, had similar upgrade problems to the original poster. I don't really care about the performance optimizations from "i386" to "i686" as long as i'll continue to have something that works.
One additional interesting data point. The CentOS 4.0 installer gave me the "i586" glibc and the "i686" kernel. I would hope that this would be consistent.
That is by design ... the i686 glibc will not work with the c3 ... the i686 kernel will.
You need to use the i386 glibc. As written, the latest RH glibc SRPM will not build for --target i486 or --target i586 ... I am close to making it build properly for --target i586, but since the .i386 glibc works well on i586 and it should build with that target unmodified in the future, that is the way we will proceed.