LRSCwait: Enabling Scalable and Efficient Synchronization in Manycore Systems through Polling-Free and Retry-Free Operation

Samuel Riedel, Marc Gantenbein, Alessandro Ottaviano, Torsten Hoefler, Luca Benini · DOI

Abstract

Synchronization is a critical bottleneck in manycore systems, where traditional Load-Reserved/Store-Conditional (LR/SC) primitives suffer from "thundering herd" effects and excessive retries under high contention. This paper introduces LRSCwait, a novel synchronization primitive that replaces retry loops with a hardware-managed queue. By shifting the linearization point to the Load operation, LRSCwait allows cores to sleep until they are granted access to a shared variable. We present Colibri, an area-efficient implementation using a distributed linked-list approach. Evaluation on a 256-core RISC-V system demonstrates that Colibri achieves up to 6.5× higher throughput and 7.1× better energy efficiency than standard LRSC, while eliminating interference with non-synchronizing cores.

Introduction

In manycore architectures featuring hundreds of cores, synchronization primitives are often the ultimate performance bottleneck. Modern processors typically rely on Load-Reserved (LR) and Store-Conditional (SC) instructions for atomic updates. However, under high contention, multiple cores competing for the same memory address lead to a "thundering herd" effect: only one core succeeds, while others must retry the entire sequence. This results in significant energy waste due to busy-waiting (polling) and increased interconnect traffic that interferes with unrelated computational tasks.

Methods: The LRSCwait Primitive and Colibri Architecture

The proposed LRSCwait paradigm shifts the linearization point—the moment the order of operations is determined—from the Store to the Load.

  1. LRwait and SCwait: The LRwait instruction places a requesting core into a hardware-managed queue. The memory controller responds to only one core at a time. Once a core receives its data, its subsequent SCwait is guaranteed to succeed, eliminating the "work-then-fail" cycle.
  2. Mwait: A specialized instruction allows cores to sleep until a specific memory address changes, optimizing producer-consumer patterns without the overhead of constant polling.
  3. Colibri Architecture: To ensure scalability, Colibri implements a distributed linked-list queue. Unlike traditional $O(n \times m)$ reservation tables that require massive area, Colibri assigns one "queue node" (Qnode) per core and a head/tail pointer per memory bank. This reduces area overhead to approximately 6%.
Architectural comparison of traditional LRSC, an ideal queued LRSC, and the proposed Colibri implementation.

Results and Discussion

The Colibri architecture was evaluated on the MemPool platform, a 256-core RISC-V system with 1024 memory banks. Key findings include:

  • Throughput: In high-contention concurrent histogram benchmarks (1 bin), Colibri achieves a 6.5× throughput increase over standard LRSC. As contention decreases (more bins), performance approaches the theoretical roofline of specialized hardware atomic adders.
  • Energy Efficiency: Colibri is 7.1× more energy-efficient than LRSC and 8.8× more efficient than traditional hardware locks.
  • Interference Mitigation: Standard LRSC polling can degrade the performance of unrelated background tasks (e.g., matrix multiplication) to 26% of their original speed. By allowing contending cores to sleep, Colibri results in zero performance degradation for non-synchronizing workers.
Throughput comparison (histogram updates per cycle) across different synchronization methods and contention levels.

Conclusion

LRSCwait and the Colibri architecture provide a scalable solution for manycore synchronization by replacing inefficient retries with orderly queuing. While current implementations focus on scratchpad-based systems, future work includes adapting these primitives for cache-coherent hierarchies and enhancing software robustness against hanging blocks through hardware timeouts.

Summary updated

BibTeX
@inproceedings{riedel2024lrscwait,
  author = {Samuel Riedel and Marc Gantenbein and Alessandro Ottaviano and Torsten Hoefler and Luca Benini},
  title = {{LRSCwait: Enabling Scalable and Efficient Synchronization in Manycore Systems through Polling-Free and Retry-Free Operation}},
  booktitle = {DATE},
  year = {2024},
  doi = {10.23919/date58400.2024.10546857},
}
Figure