From Fedora Project Wiki

< Changes

Revision as of 13:10, 15 June 2018 by Fweimer (talk | contribs) (x86 SIG needs to formulate release note)

i686 Is For x86-64

Summary

Fedora builds its i686 packages for use on x86-64 systems as multi-lib RPMs.

Owner

Current status

  • Targeted release: Fedora 29
  • Last updated: 2018-06-15
  • Tracker bug: <will be assigned by the Wrangler>

Detailed Description

Currently, the i686 RPM packages are built in such a way that they are compatible with very old i686 systems, such as the Pentium III. The only addition over the i686/Pentium Pro baseline is a requirement to support long NOPs, for Intel CET. However, the majority of installations of i686 packages is for use on x86_64 systems, as multi-lib RPMs. Furthermore, there are reports that the i686 kernel does not run stable on old hardware which is not x86-64-capable.

This proposal suggests to accept this reality and build the i686 packages in such a way that they require the ISA level of (early) x86-64 CPUs.

The compiled binaries should still remain compatible with the i686 alternative architecture, so they do not need rebuilding. (The instructions generated by GCC are compatible with a pure 32-bit x86 platform.) However, Fedora does not currently perform automated tests to enforce this.

Benefit to Fedora

32-bit Fedora packages will be optimized for use on current x86_64 systems:

  • The default compiler flags will be switched to -march=i686 -msse2 -mtune=generic -mfpmath=sse -mstackrealign. This enables SSE2 support with optimal backwards compatibility due to automatic stack realignment. (16-byte stack alignment was introduced with SSE2 support in the i386 ABI, but old binaries only provide 4-byte stack alignment.)
  • x86 packages can use SSE2 optimizations unconditionally.
  • This increases compatibility with some upstreams which have mostly given up on support for non-SSE2 x86 systems.
  • Excess precision problems inherent to the legacy i387 FPU disappear, and math results become more predictable.

The latter two times are primarily a benefit to those developers who work on Fedora itself.

Scope

  • Proposal owners: Adjust the redhat-rpm-config, gcc, and glibc packages to switch to the new compiler flags. Except for the interaction -mstackrealign, there is substantial experience with SSE2-enabled compilation on i686 downstream.
  • Other developers:
    • Other developers can enable SSE2 optimization in their packages if they want, where this has been a compile-time option only.
    • The x86 SIG continues testing the i686 alternative architecture on legacy hardware.
  • Release engineering: #7543
  • Policies and guidelines: i686 is no longer a primary architecture. The Packaging Guidelines do not currently require support for non-SSE2 x86 systems, so no change is required there.
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

32-bit x86 systems which lack SSE2 support will not be able to upgrade to Fedora 29.

This only applies to 32-bit x86 systems. For 64-bit x86 systems, SSE2 support is a required support of the baseline ABI and already extensively used by Fedora.

How To Test

Install Fedora 29 after the mass rebuild and test 32-bit (i686) packages for functionality.

Extra tests could involve old 32-bit legacy applications compiled with non-GCC compilers.

User Experience

There is no expected substantial change in user experience, except for a minor performance improvements and potentially some slight reduction in power usage.

Dependencies

We are not aware of any dependencies at this point.

Contingency Plan

  • Contingency mechanism: Back out the change.
  • Contingency deadline: Before the final mass rebuild.
  • Blocks release? No.
  • Blocks product? No.

Documentation

Documentation in a Release Note appears sufficient.

Release Notes

The x86 SIG will have to update the release notes for the i686 alternative architecture, noting that SSE2 support is now required. Primary architectures will not see a change.