Introduction
In Embedded Critical Systems (ECS)—such as those found in avionics and automotive applications—predictability is a paramount requirement. As these systems adopt multicore processors to manage increasingly complex tasks like 3D path planning, they rely heavily on cache coherence to facilitate efficient data sharing. However, cache coherence introduces non-deterministic timing interference: if one core writes to a memory address that another core is reading, the latter may be stalled.
Existing hardware performance monitors (PMCs) are often "blind" to the specific sources of these delays. While they can detect that a stall occurred, they cannot identify which core caused the interference or quantify the duration of the delay. This lack of visibility makes it difficult for engineers to establish tight timing bounds or identify bottleneck threads in safety-critical environments.
Remote Protocol-Contention Tracking (RPCT)
To address these challenges, this paper introduces Remote Protocol-Contention Tracking (RPCT), a low-overhead hardware monitoring infrastructure. RPCT is designed to track cycle-accurate delays caused by cache coherence protocols without requiring modifications to the underlying protocol (e.g., MSI), which is crucial for maintaining the safety certifications of existing systems.
System Architecture
The proposed infrastructure is integrated into a standard multicore architecture featuring private L1 caches and a shared L2 cache connected via a bus-based interconnect.
Key Features of RPCT
- Two-Pronged Tracking: RPCT distinguishes between bus-access contention (waiting for physical bus availability) and protocol contention (waiting for coherence logic processing, such as data invalidations).
- The $N^2$ Counter Matrix: For a system with $N$ cores, RPCT maintains a matrix of counters where each entry $(i, j)$ tracks the cycles of contention that Core $i$ imposed on Core $j$.
- Hardware Components: The implementation adds minimal logic, including a CRBuffer for pending requests and a CAM-RAM to store waiting core information. Auto-incrementers tick the relevant counters every cycle a core is stalled by a specific "aggressor."
Tracking Mechanism and Indirect Contention
A key insight of the RPCT design is its ability to capture "indirect protocol contention." For instance, if Core 0 is waiting for Core 1, and Core 2's request is queued behind Core 1's response, RPCT correctly attributes the delay for Core 2 to Core 1. This fine-grained tracking is achieved by monitoring coherence messages and state transitions in real-time.
Evaluation and Key Results
The researchers evaluated RPCT using the gem5 simulator with the Splash-3 parallel benchmark suite and custom synthetic workloads.
- Accuracy in Attribution: Synthetic tests confirmed that RPCT accurately breaks down delays. In heavy-write scenarios, it successfully quantified the exact cycle counts each core contributed to the stalls of its peers.
- Optimization Insights: Using the
OCEANbenchmark, RPCT revealed that a performance-optimized version of the code actually tripled inter-core protocol contention. While overall performance improved, RPCT provided the diagnostic data to understand the increased communication overhead. - Low Overhead: The hardware cost is minimal, requiring less than 100 bytes of storage per core and simple logic that only activates during coherence events, ensuring low power consumption.
Conclusion
RPCT provides the necessary visibility into cache coherence interference to enable tighter Worst-Case Execution Time (WCET) bounds and more effective software optimization in real-time multicore systems. Future work will explore extending this logic to more complex protocols like MESIF and integrating RPCT data into real-time operating systems for dynamic task scheduling.
Summary updated