基于保留收益的智能高速缓存替换
Retention Benefit Based Intelligent Cache Replacement
-
摘要: 在现代计算机系统中,由不同高速缓存失效引起的处理器的性能损失可变,这主要有两个原因:1)访存延迟可变;2)处理器对不同高速缓存失效的容忍能力不同.相对于并行发生的失效以及写失效,单独发生的读失效和取指失效具有更大的失效代价.由于高速缓存的失效代价可变,因此需要高速缓存替换策略能够考虑这种变化.为此,首先我们提出了保留收益的概念.保留收益不但能够评估在高速缓存失效时增加的处理器停顿周期数,也能够评估在高速缓存命中时减少的处理器停顿周期数.然后,我们提出了以增加高速缓存中所有块的总保留收益为目标的基于保留收益的替换策略RBR.RBR为高速缓存中每个块分别记录它们的总保留收益,并在替换时优先替换总保留收益最小的块.实验评测表明RBR在单核环境和多核环境中都可以显著改善高速缓存的性能,并且它只需要很小的存储开销.RBR的性能也超过了其他新近提出的高速缓存替换策略.Abstract: The performance loss resulting from different cache misses is variable in modern systems for two reasons: 1) memory access latency is not uniform, and 2) the latency toleration ability of processor cores varies across different misses. Compared with parallel misses and store misses, isolated fetch and load misses are more costly. The variation of cache miss penalty suggests that the cache replacement policy should take it into account. To that end, first, we propose the notion of retention benefit. Retention benefits can evaluate not only the increment of processor stall cycles on cache misses, but also the reduction of processor stall cycles due to cache hits. Then, we propose Retention Benefit Based Replacement (RBR) which aims to maximize the aggregate retention benefits of blocks reserved in the cache. RBR keeps track of the total retention benefit for each block in the cache, and it preferentially evicts the block with the minimum total retention benefit on replacement. The evaluation shows that RBR can improve cache performance significantly in both single-core and multi-core environment while requiring a low storage overhead. It also outperforms other state-of-the-art techniques.