Abstract
Modern processor performance is increasingly constrained by the "memory wall," the latency gap between high-speed CPUs and DRAM. While hybrid hardware prefetchers attempt to bridge this gap by combining multiple algorithms, they often suffer from input pollution and resource contention. This paper introduces Alecto, a novel framework that integrates prefetcher selection with Dynamic Demand Request Allocation (DDRA). By using fine-grained, Program Counter (PC)-based allocation, Alecto ensures that only relevant memory requests train specific prefetchers. Experimental results using the gem5 simulator demonstrate that Alecto outperforms state-of-the-art reinforcement learning selectors by up to 7.56% in multi-core configurations while reducing prefetcher-related energy consumption by 48%.
Introduction
To mitigate memory latency, modern CPUs employ hardware prefetchers that predict future access patterns and fetch data into the cache before it is explicitly requested. Because no single algorithm can capture the diversity of memory patterns in complex workloads, processors typically use hybrid systems combining stream, stride, spatial, and temporal prefetchers.
However, these hybrid systems face a "too many cooks in the kitchen" problem. In standard implementations, every prefetcher observes every demand request. This leads to input pollution, where a prefetcher's limited internal metadata tables are filled with "noise" from patterns it cannot recognize, evicting useful data. Furthermore, these prefetchers compete for shared resources like prefetch queues and DRAM bandwidth. Existing selection mechanisms, such as Bandit-based reinforcement learning, often apply global rules that fail to account for the distinct behaviors of individual instructions (PCs) within a single program.
The Alecto Framework
Alecto addresses these inefficiencies by acting as a traffic controller for memory requests. Instead of merely throttling the output of prefetchers, Alecto implements Dynamic Demand Request Allocation (DDRA) to control the input. By filtering which requests "train" which prefetcher at the PC level, Alecto prevents internal table corruption and optimizes resource utilization.
Key Architectural Components
- Allocation Table: This structure is indexed by the PC and tracks the performance state of each prefetcher for specific instructions.
- The State Machine: For every PC, each prefetcher exists in one of three states:
- Un-Identified (UI): The default testing state where the prefetcher is evaluated with a conservative prefetch degree.
- Identified and Aggressive (IA): The prefetcher has proven effective for this specific PC; it receives all relevant requests and is granted a higher prefetch degree.
- Identified and Blocked (IB): The prefetcher is deemed unsuitable for the current pattern. It is "muted" to prevent it from polluting its internal tables with irrelevant data.
- Sandbox Table: This dual-purpose structure records issued prefetches to calculate accuracy for the Allocation Table and serves as a filter to eliminate duplicate requests to the cache.
- Sample Table: This component aggregates hits and misses over epochs of 100 demand accesses, providing the metrics necessary to trigger state transitions.
Experimental Methodology
The researchers evaluated Alecto using the gem5 execution-driven simulator. The framework was tested against a variety of industry-standard benchmarks, including SPEC CPU2006, SPEC CPU2017, PARSEC 3.0 (for multi-core analysis), and the Ligra graph processing framework for irregular patterns. The study specifically focused on memory-intensive subsets to stress the hierarchy and compare Alecto against the state-of-the-art RL-based "Bandit" selector.
Key Insights and Results
Performance Gains
Alecto demonstrates significant performance improvements over existing selectors. It outperforms the Bandit algorithm by 2.76% in single-core scenarios and 7.56% in eight-core configurations. On the most challenging, memory-intensive SPEC benchmarks, Alecto maintains a 5.25% lead over the RL-based baseline.
Resource and Energy Efficiency
One of Alecto's most significant advantages is its efficiency. Unlike RL approaches that require substantial storage for rewards and arms, Alecto requires a storage overhead of less than 1 KB. Furthermore, by blocking unsuitable prefetchers (the IB state), Alecto eliminates unnecessary table lookups and updates. This results in a 48% reduction in prefetcher-related energy consumption and a 7% reduction in total memory hierarchy energy.
Synergy with Temporal Prefetching
Temporal prefetchers, which record long sequences of addresses, are particularly sensitive to table pollution. Alecto significantly enhances their utility by filtering out non-temporal or rare patterns, allowing the temporal prefetcher to dedicate its limited capacity to high-value, recurring sequences.
Conclusion and Future Work
Alecto proves that controlling the input to prefetchers is more effective than simply managing their output. By making allocation decisions at the PC granularity, Alecto tailors hardware responses to specific code behaviors, maximizing accuracy while minimizing waste.
Future research may explore dynamic epoch sizing to improve responsiveness to program phase changes and adaptive threshold tuning for Proficiency (PB) and Deficiency (DB) boundaries based on real-time DRAM bandwidth. Additionally, investigating the interaction between Alecto and more complex, machine-learning-based prefetchers remains a promising avenue for further optimization.
Summary updated