Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Exploring x86-64-v3 for Red Hat Enterprise Linux 10

January 2, 2024
Florian Weimer
Related topics:
CompilersLinux
Related products:
Red Hat Enterprise Linux

Share:

    In Red Hat Enterprise Linux (RHEL) 9, we upgraded the instruction set architecture (ISA) baseline to the x86-64-v2 microarchitecture level. For RHEL 10, we are exploring whether we can go a step further, to the x86-64-v3 level.

    New CPU capabilities in x86-64-v3

    The x86-64-v3 x86-64 microarchitecture level primarily benefits numerical applications (for data science, for example) which do not include specialized implementations for modern CPU microarchitectures. Overall, the x86-64-v3 change brings the following improvements:

    • The AVX and AVX2 instruction sets increase the width of the vector registers from 128 bits to 256 bits and add many new vector operations. 
    • The fused multiply-add (FMA) instruction is supported, combining multiplication and addition into a single operation that computes the intermediate result with infinite precision.
    • The VEX encoding adds variants for many existing instructions which include a second or third (destination) operand. Input operands are no longer updated destructively with these instruction variants. This reduces the need for explicit move instructions, which in turn increases code density and decreases instruction cache pressure.
    • Many bit manipulation operations have been added for scalar registers, including parallel bit deposit and bit extract.

    The vector instruction enhancements look particularly promising because starting with version 12, GCC supports auto-vectorization at -O2 (the default optimization level for RHEL).

    Compatibility impact

    The x86-64-v3 level has been implemented first in Intel’s Haswell CPU generation (2013). AMD implemented x86-64-v3 support with the Excavator microarchitecture (2015). Intel’s Atom product line added x86-64-v3 support with the Gracemont microarchitecture (2021), but Intel has continued to release Atom CPUs without AVX support after that (Parker Ridge in 2022, and an Elkhart Lake variant in 2023).

    While some ISA enhancements can be used in isolated code blocks using manually crafted run-time dispatching logic, these additional ISA capabilities impact instruction selection across the entire program (including scalar code), in many cases without explicit use of compiler built-in functions. This means that run-time selection between code that uses these ISA enhancements and code that does not is not feasible, and adopting x86-64-v3 will exclude some systems from being able to run RHEL 10, just as the choice of x86-64-v2 for RHEL 9 excluded some systems.

    Our analysis suggests that the environments that are in scope for RHEL 10 are ready for x86-64-v3.  Hypervisors may need reconfiguration to pass through x86-64-v3 CPU capabilities. Some hypervisors have more restrictive defaults, typically for enabling migration to different CPUs whose capabilities are not a perfect match for the current host.  Such configuration changes were already required for the x86-64-v2 transition in RHEL 9.  Reconfiguring hypervisors will also result in a performance improvement for previous releases of RHEL, where the function selection (e.g., for C string functions) is often not optimal for the host CPU due to masked CPU capabilities.  We plan to improve diagnostics for these scenarios.

    Verifying performance improvements

    The CentOS ISA SIG has produced rebuilds of CentOS 9 with x86-64-v2 and x86-64-v3 baselines, after upgrading the system compiler to GCC 12. As mentioned above, GCC 11, the RHEL 9 system compiler, does not support auto-vectorization at -O2, which is why we switched to GCC 12 for these rebuilds. For this experiment, GCC 12 is still reasonably close to GCC 11 in terms of bug-for-bug C++ compatibility, so that few packages needed fixing before they could be rebuilt. We hope that these builds can be used to show performance improvements for key packages and workloads.

    Even if we cannot show performance improvements for software included in RHEL, it may still make sense to go ahead with the switch. The reason is that if RHEL 10 requires the x86-64-v3 baseline, ISVs will be able to rely on it, too. This reduces maintenance cost for some ISVs because they no longer need to maintain (and test) AVX and non-AVX code paths in their manually tuned software.

    What about x86-64-v4?

    We do not think that x86-64-v4 is useful for a general-purpose operating system today. Intel’s current generation of efficiency cores does not support x86-64-v4. The Tiger Lake generation of CPUs supported AVX-512 in the client segment, but earlier and later client generations lacked support. Furthermore, Intel has announced a variant of AVX-512 called AVX10 that has a reduced vector width of  256 bits and does not provide the 512 bit vectors required by x86-64-v4.

    AMD offers x86-64-v4 across their Zen 4 CPUs, but the switch to that CPU generation will still be relatively recent when RHEL 10 is scheduled to come out. Given that we need to build a single operating system image for all supported x86-64 CPUs, we need to pick a lower baseline than x86-64-v4.

    Conclusion

    While our plan of record may change based on further findings, we are excited about the prospect that RHEL 10 will move to the x86-64-v3 baseline. You can check out your own software today by rebuilding it with -march=x86-64-v3 and testing it against the x86-64-v3 package builds from the CentOS ISA SIG.  We welcome your feedback on the CentOS devel mailing list.

    Last updated: April 4, 2024

    Related Posts

    • Building Red Hat Enterprise Linux 9 for the x86-64-v2 microarchitecture level

    • Vectorization optimization in GCC

    • New C features in GCC 13

    • Improvements to static analysis in the GCC 13 compiler

    • How the new RHEL 9.2 improves the developer experience

    • Improvements to static analysis in the GCC 14 compiler

    Recent Posts

    • How to run AI models in cloud development environments

    • How Trilio secures OpenShift virtual machines and containers

    • How to implement observability with Node.js and Llama Stack

    • How to encrypt RHEL images for Azure confidential VMs

    • How to manage RHEL virtual machines with Podman Desktop

    What’s up next?

    RHEL 8

    Download our Red Hat Enterprise Linux cheat sheet, which covers basic dnf commands and introduces the Subscription Manager and Application Streams features for developers in RHEL 8.

    Get the cheat sheet
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue