|
|
Log in / Subscribe / Register

32-Bit x86 support in Fedora

By Jake Edge
July 19, 2017

An under-the-radar proposal to stop building i686 kernels for Fedora led to a discussion about dropping support for 32-bit x86 hardware. Any of the hardware that needs these kernels is quite old, but participants in a thread on the Fedora devel mailing list noted that those systems still exist—some run Fedora. As the discussion progressed, though, it became clear that the Fedora i686 kernel has been in rough shape for some time now.

Florian Weimer raised the issue on July 11, likely inadvertently. He pointed to a proposal to stop building i686 kernels for Fedora 27 and noted that if that were to be adopted, it would mean that all x86 hardware still supported by Fedora would have the SSE2 instructions. That would allow the compile flags to be updated to add SSE2 before the "mass rebuild" for that release.

The "drop i686" proposal was marked as "not a system-wide change", but several in the thread objected to that designation. For example, Chris Adams pointed out that "it would remove a supported architecture completely". In addition, several pointed to Atom-based systems that are 32-bit, some of which are still being sold (mostly in the embedded space). Those CPUs do have SSE2, so it is possible that Weimer's request to enable SSE2 support would still make sense. Most other hardware that would be unable to run Fedora without an i686 kernel is at least ten years old.

But the Fedora i686 kernel has been in a state of benign neglect for several years. Josh Boyer said that the kernel team has not been doing much, if anything, for i686 kernels lately:

Anyone with 32-bit hardware is going to be against this change. It is a known downside. It also doesn't change the fact that i686 kernels are in a zombie state, where the kernel team does not actively support them and the community has not significantly stepped up to do so. That approach was done quite a while ago, and explicitly communicated.

Boyer concluded by saying that it was "basically luck" if i686 kernels are still working. In fact, Richard W. M. Jones said that he had stopped testing libguestfs with i686 kernels because they were broken most of the time when he tried them using QEMU; nobody was interested in fixing the bugs, he said. Laura Abbott added some perspective on the kinds of bugs that have appeared in i686 kernels; she said that the best way forward was to work with the upstream kernel community:

My overall concern with continuing to ship i686 kernels is any participants need to be active in advocating upstream. The only reason certain drivers or hardware are supported upstream is because of one or two people who stubbornly refuse to let it go. i686 is nowhere close to actually being deleted but fixing reported bugs in bugzilla is not a sustainable solution without at least some participation upstream to keep 32-bit healthy as Fedora relies very very heavily on upstream.

Ralf Corsepius posited that the lack of interest in i686 for Fedora really stemmed from a lack of interest by Red Hat. Fedora project leader Matthew Miller did not really disagree with that, saying that it is easier to support architectures that a company is paying someone to care about. Since Red Hat is not doing so, and no other company has stepped up, i686 kernels have languished. On the flipside, though:

I guarantee you that if some non-Red Hat person showed up and said "Hey, I'm here to work on i686 N hours per week", we would say "awesome", not "Red Hat doesn't care".

It is not just the kernel that is suffering, either. Adam Williamson pointed out that there is a ten-month-old bug for an installer feature that does not work correctly on 32-bit x86 kernels. Part of the problem is that there is nowhere for him to refer the bug: "There is no i686 WG/SIG, no more informal but well-known 'group of people who care about and help fix i686 bugs', so I can't do it for that bug", he said in another post.

Hans de Goede seemed to be taken aback by the "zombie" status of the i686 kernel. Boyer pointed to a post he made in February 2015 that laid out the problem from the kernel team's perspective and asked for the community to step up to help fix i686 bugs. Others in the thread listed additional places where the topic had come up as well. No one stepped up, which meant that i686 bugs simply languished.

But De Goede thought that Boyer's message was too much of a "generic, non specific call for help". What would be more helpful, he said, is "a concrete list of things people who care about i686 can work [on]". While Boyer agreed that kind of a list would be useful, he asked: "Are you volunteering to triage all the bugs and create it and maintain that list?" De Goede didn't directly address that question, but did recognize that an i686 SIG needed to be formed in order to move forward. He asked for some guidelines on what needed to happen in order to keep i686 kernels alive for Fedora 28 (the proposal to drop i686 kernels was submitted too late to be considered for Fedora 27).

Miller promptly provided that guidance, at least in draft form; the Fedora Engineering Steering Committee (FESCo) will presumably finalize the guidelines at an upcoming meeting. The idea is that if there is no functional i686 SIG by the Fedora 27 release, the kernel will be dropped for Fedora 28. The criteria for what "functional" means will need to be hammered out.

Corsepius complained that getting rid of i686 kernels showed that Fedora is not really a community-driven distribution. But Boyer strongly disagreed with that:

Community driven doesn't mean "I complain and someone else does the work so I get what I want." If you would like to see i686 kernels continue to be supported, please step up and volunteer to lead that effort. We asked for community help several releases ago and got none.

Moving forward, Stephen J. Smoogen has put out a call to gauge interest in forming an x86_32 SIG. He created a wiki page and listed some preliminary steps that would need to be taken. There has been a bit of activity on the wiki and some interest shown in the thread, but nothing overwhelming at this point. There was interest in a mailing list, so Smoogen created x86@lists.fedoraproject.org on July 18; the archives are rather sparse, so far, but it has only been a day or so.

It is unfortunate when older hardware gets left behind though, as Andy Lutomirski mentioned in the thread, the upstream kernel has good support for i686 (and even i486) these days. But distributions have to apportion their efforts in ways that make the most sense for them. Quite a few Linux distributions are eliminating 32-bit builds, so Fedora is hardly alone if it takes that route. But "community driven" also means that some parts have to be community supported, too, even for distributions like Fedora that have a large company behind them.



to post comments

32-Bit x86 support in Fedora

Posted Jul 19, 2017 20:13 UTC (Wed) by smoogen (subscriber, #97) [Link]

Thank you for the coverage on this.

32-Bit x86 support in Fedora

Posted Jul 19, 2017 22:00 UTC (Wed) by karkhaz (subscriber, #99844) [Link]

FWIW, Arch Linux recently deprecated support for i686; it will no longer be supported from this November. Arch doesn't support lots of architectures like Debian or Fedora does, either---x86_64 is the only other platform with official support.

https://www.archlinux.org/news/phasing-out-i686-support/

Y2038 (was: 32-Bit x86 support in Fedora)

Posted Jul 20, 2017 1:04 UTC (Thu) by cesarb (subscriber, #6266) [Link]

> Quite a few Linux distributions are eliminating 32-bit builds, so Fedora is hardly alone if it takes that route.

If this happens, I won't be surprised if 20 years later this is seen as having been the correct choice.

32-Bit x86 support in Fedora

Posted Jul 20, 2017 3:43 UTC (Thu) by chder (subscriber, #96621) [Link] (1 responses)

Seems like they need more of this kind of call for help on the 32 bit version's download page... unless they already do.

I don't see any such appeal on https://getfedora.org/en/workstation/download/ but it may be detecting my arch and not bothering since it is defaulting to giving me the 64 bit version anyways.

32-Bit x86 support in Fedora

Posted Jul 20, 2017 19:25 UTC (Thu) by smoogen (subscriber, #97) [Link]

The default download is 64 bit with lines on the right for 32 bit downloads. The reason is that i386 downloads have been dropping in requests with ~95% of the users for F25 using x86_64.

32bit have a couple of advantages for VMs

Posted Jul 20, 2017 7:01 UTC (Thu) by gmatht (subscriber, #58961) [Link] (7 responses)

VirtualBox won't let you virtualize AMD64 images without support from BIOS. Saving memory can be important for VMs, and i686 is still better supported than the newer x32 ABI. Nevertheless, I've switched to AMD64 everywhere.

It is not clear how dropping i686 would help much with SSE2. Presumably we could enable SSE2 on the AMD64 bit arch and leave i686 alone. Or is the consideration people who run i686 code on 64bit kernels?

32bit have a couple of advantages for VMs

Posted Jul 20, 2017 8:37 UTC (Thu) by farnz (subscriber, #17727) [Link] (6 responses)

SSE2 is a compulsory part of AMD64, for both long mode (64-bit kernel) and legacy mode (32-bit or 16-bit kernel). Real i686-class machines are not guaranteed to have SSE2 - the Pentium III and 32-bit AMD Athlon chips don't, for example; thus, if Fedora drops support for i686, SSE2 becomes a baseline feature for 32-bit userspace (as the kernel is 64-bit). At the moment, 32-bit userspace can't assume SSE or SSE2 support, which means that it has to use the (less tested, nowadays) x87 FP support, instead of the (much saner) SSE2 FP support.

Fedora could take a baby step in this direction if people stepped up to the plate to support it, and change its i686 to require SSE2; however, that's a decision for an x86-32 SIG to make once it's up and running (as that'll be the people doing the work).

32bit have a couple of advantages for VMs

Posted Jul 20, 2017 10:13 UTC (Thu) by epa (subscriber, #39769) [Link] (5 responses)

Can you trap SSE2 instructions and emulate them with x87 (or MMX or SSE) instructions on older systems? Or is that idea a non-starter? I know Linux used to have an x87 floating point emulator for 486SX and similar systems.

32bit have a couple of advantages for VMs

Posted Jul 20, 2017 10:32 UTC (Thu) by farnz (subscriber, #17727) [Link]

The same issue applies here as to that old x87 emulator - it's considerably slower than "real" SSE2, and would almost certainly be considerably slower than just using the x87 path. Plus, it would still be under-tested; instead of the x87 path being under-tested in the apps that use it, you'd now have a slow and under-tested emulator.

32bit have a couple of advantages for VMs

Posted Jul 20, 2017 11:17 UTC (Thu) by zdzichu (subscriber, #17118) [Link] (2 responses)

You can do anything in software. But man hour cost for coding such emulation would greatly exceed the cost of losing i686 support. Anyway SSE2 emulation would be throw-away code. People don't want to create DoA things.
No one volunteered to take care of 32 bit bugs in distribution, and taking care of bugs is much much simple than coding SSE2 emulation.

32bit have a couple of advantages for VMs

Posted Jul 20, 2017 15:00 UTC (Thu) by epa (subscriber, #39769) [Link] (1 responses)

I just wondered if perhaps Intel (or AMD) in the past had written such an SSE2 floating point emulator and released it. Chipmakers do occasionally write emulators for their current or upcoming products. The existence of the emulator doesn't reduce future sales since it is inevitably slower than real silicon.

32bit have a couple of advantages for VMs

Posted Jul 20, 2017 17:21 UTC (Thu) by excors (subscriber, #95769) [Link]

I suspect a kernel-based emulator would be around three orders of magnitude slower than hardware - e.g. an SSE2 instruction can perform 16 8-bit additions in a third of a clock cycle (on modern CPUs), or 4 float additions in half a cycle, whereas trapping into the kernel and performing all those operations serially and saving the results in an emulated register file in memory is going to take forever. Even a non-performance-intensive application that only spends 10% of its time dealing with floats could run 100x slower with emulation.

For users, an application running 100x slower may be nearly as unusable as an application crashing with an "instruction not supported" error, and is much harder for the application's developer to debug from a bug report. In both cases the developer would probably just switch their compiler flags from SSE2 to x87 once they recognise the problem.

Applications that do lots of number crunching and want to support a wide range of users will already provide both x87 and SSE2 code paths, and select one based on CPU capabilities, so the emulation won't improve compatibility there (and might confuse the capability detection code).

The only case where emulation would really help is code that uses a non-zero but tiny amount of SSE2, so it would improve compatibility and nobody would care about the performance cost, and that doesn't sound common enough to justify a substantial effort.

There is an Intel Software Development Emulator <https://software.intel.com/en-us/articles/intel-software-...> that emulates recent SIMD instructions etc, but that's for developers to test them before hardware support is available, it's not intended for users. (It seems to do a sort of JIT translation that can replace certain instructions with calls into the emulator, which is much faster than reacting to illegal instruction exceptions.)

I wish! But no.

Posted Jul 27, 2017 19:52 UTC (Thu) by felix.s (guest, #104710) [Link]

You mean, catch SIGILL/the illegal opcode exception, emulate the opcode in software and resume execution? I've actually tried doing just that: it didn't work. The reason is that some SSE2 opcodes are encoded as REP-prefixed SSE opcodes, and my Pentium III simply ignored the REP prefix instead of generating an illegal opcode exception.

So instead of crashing with SIGILL, SSE2 programs started crashing with SIGSEGV because %ebp was being randomly thrashed...

32-Bit x86 support in Fedora

Posted Jul 20, 2017 8:51 UTC (Thu) by sorokin (guest, #88478) [Link] (1 responses)

As distributions are dropping i686, does it mean that year 2038 problem is not a problem now?

Also I'm glad that legendary GCC bug 323 isn't a bug now. Strictly speaking deprecating i686 wasn't necessary for this, requiring cpu to support SSE (Pentium III) would be enough.

32-Bit x86 support in Fedora

Posted Jul 20, 2017 9:06 UTC (Thu) by pr1268 (guest, #24648) [Link]

I was going to ask the same question, but then I realized that other 32-bit NON-x86 architectures may continue to be supported (and for whom SSE2 [or lack thereof] is inapplicable). But, 32-bit time_t may still be around for some time to come.

Is that indeed the case?

32-Bit x86 support in Fedora

Posted Jul 20, 2017 10:24 UTC (Thu) by marcH (subscriber, #57642) [Link] (2 responses)

> In addition, several pointed to Atom-based systems that are 32-bit, some of which are still being sold (mostly in the embedded space).

Just checked and Fedora seems to support 32bit ARMv7 (4Go is a decent amount of RAM for an average "embedded" system)

Curious about the (vague) number of i686 bugs at stake here and their typical nature.

(and yes: too lazy to click on every link and more in the article :-)

32-Bit x86 support in Fedora

Posted Jul 20, 2017 14:50 UTC (Thu) by smoogen (subscriber, #97) [Link] (1 responses)

Fedora is still committed to working on arm 32 bit as long as people are coming to the table to fix problems. I have not started looking at the number of i686 bugs but what people had said to me was that they were generally limitations of the x86 platform that are exasperated by the lack of space in 32 bit. [They still 'exist' in 64 bits but are shoved out into petabyte memory ranges versus gigabyte ranges.]

In the end, I am mostly trying to get people to say they are really going to work on things or not. This is a similar problem to the python-ideas article. My goal is to see if people who want i686 to continue have enough time to make it continue. If they don't then it would be good to help them transition to either an OS that has a larger clump of people who do.

[Completely OT] 32-Bit x86 support in Fedora

Posted Jul 21, 2017 18:38 UTC (Fri) by dskoll (subscriber, #1630) [Link]

I think you meant exacerbated rather than exasperated, but your way is much funnier and more picturesque! :)


Copyright © 2017, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds