Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Arm Community blogs
Arm Community blogs
Architectures and Processors blog Views on Relaxed Atomics in C++ from Arm’s technical leadership team
  • Blogs
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
More blogs in Arm Community blogs
  • AI blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded and Microcontrollers blog

  • Internet of Things (IoT) blog

  • Laptops and Desktops blog

  • Mobile, Graphics, and Gaming blog

  • Operating Systems blog

  • Servers and Cloud Computing blog

  • SoC Design and Simulation blog

  • Tools, Software and IDEs blog

Tell us what you think
Tags
  • C++
  • Architectures
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

Views on Relaxed Atomics in C++ from Arm’s technical leadership team

Richard Grisenthwaite
Richard Grisenthwaite
November 3, 2023
2 minute read time.

Academic research is critical to the semiconductor industry’s continued ability to push the boundaries of what’s possible, which is why, among several other initiatives within the academic and research community, Arm sponsors PhDs under schemes such as EPSRC iCASE. While undertaking their research, many of the students that work at Arm, or are funded by Arm through these schemes, continue to publish their own independent research. This research, unless it is clearly stated, is not endorsed by or supported by Arm in any way.

A recent post by one such student revives an existing proposal that has already been investigated in academic communities (for example here) on the topic of tightening the compilation of C++ Relaxed Atomics towards various architectures.

This proposal was not formally reviewed by Arm or endorsed by anyone at Arm, despite references in its acknowledgement paragraph. It does not change our official position on the matter, which is: Arm believes that today, the cost implications of tightening C++ relaxed atomics outweigh its benefit.

In addition, we thought it would be useful to provide some critical context and factual corrections to the post:

  • The characterization in the post of there being "thousands of bug instances related to relaxed atomics accesses" on Arm systems is unfounded – the comparison is not against the C23 specification, but against an, as yet unadopted, proposed tightening of the specification (specifically Section 2.3 as it is understood that this paper otherwise proposes changes which have been ratified). This remark has already been made by others elsewhere, for example here.
  • The post cites a performance analysis of the impact of the proposed approach based on a single very old Arm implementation, using a specific set of benchmarks. To be truly representative, analysis would need to be across a wide range of Arm implementations and properly representative set of benchmarks. The analysis would need to consider the performance risk to “super-hot” critical code paths that are using relaxed atomics to achieve performance.
  • The post implies that there is some value in having a consistent compilation approach across different architectures, which is not necessary – individual architectures have different approaches for ordering and compilers should be written to use the appropriate tools for their target architecture.

A full and scientifically rigorous analysis of the performance implications of tightening the compilation of C++ Relaxed Atomics would require significant time, cost and engineering resources. In addition, the consequence of the precedent of this to other languages, such as Java, would need to be considered. Given the fact that Arm has not received significant demand for a change of this position from its ecosystem partners, we have no plans to prioritize this sort of analysis at this time.  

Anonymous
Architectures and Processors blog
  • Introducing GICv5: Scalable and secure interrupt management for Arm

    Christoffer Dall
    Christoffer Dall
    Introducing Arm GICv5: a scalable, hypervisor-free interrupt controller for modern multi-core systems with improved virtualization and real-time support.
    • April 28, 2025
  • Getting started with AARCHMRS Features.json using Python

    Joh
    Joh
    A high-level introduction to the Arm Architecture Machine Readable Specification (AARCHMRS) Features.json with some examples to interpret and start to work with the available data using Python.
    • April 8, 2025
  • Advancing server manageability on Arm Neoverse Compute Subsystem (CSS) with OpenBMC

    Samer El-Haj-Mahmoud
    Samer El-Haj-Mahmoud
    Arm and 9elements Cyber Security have brought a prototype of OpenBMC to the Arm Neoverse Compute Subsystem (CSS) to advancing server manageability.
    • January 28, 2025