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.
- LRwait and SCwait: The
LRwaitinstruction 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 subsequentSCwaitis guaranteed to succeed, eliminating the "work-then-fail" cycle. - Mwait: A specialized instruction allows cores to sleep until a specific memory address changes, optimizing producer-consumer patterns without the overhead of constant polling.
- 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%.
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.
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