arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2105.14442cs.AR
收藏

重用基于距离的干净缓存行到低级缓存的回写

Reuse Distance-based Copy-backs of Clean Cache Lines to Lower-level Caches

Rui Wang, Chundong Wang, Chongnan Ye

摘要:

缓存在缩小CPU和主存之间的性能差距方面起着至关重要的作用。现代多核CPU通常采用多级缓存层次结构,通过该结构,最近和频繁使用的数据被维护在每个核的本地私有缓存中,而所有核共享最后一级缓存(LLC)。对于包含性高速缓存,在较高级别高速缓存中替换的干净高速缓存行不一定被复制回较低级别,因为包含性意味着它们存在于较低级别中。对于当今被Intel、AMD和ARM广泛使用的独占和非包含高速缓存,不加区别地将所有或不将替换的干净高速缓存行复制回较低级别不会违反独占性和非包含性定义。我们已经进行了定量研究,并发现,复制回所有或没有干净的高速缓存线,以较低级别的高速缓存的排他缓存需要次优的性能。其原因是,只有一部分缓存线将被重用,而其他人变成死在长期运行。这种观察促使我们选择性地将一些干净的高速缓存行复制回独占或非独占高速缓存架构中的LLC。我们重新讨论了高速缓存线的重用距离的概念。简而言之,具有较短重用距离的干净高速缓存行被复制回较低级别高速缓存,因为它可能在不久的将来被重新引用,而具有长得多的重用距离的高速缓存行将被丢弃或发送到存储器,如果它们是脏的。我们已经实施和评估了我们的建议与非易失性(STT-MRAM)有限责任公司。使用gem 5和SPEC CPU 2017基准测试的实验结果表明,平均而言,我们的建议比最近最少使用(LRU)替换策略(为STT-MRAM LLC复制所有干净的高速缓存行)的IPC吞吐量(每周期指令)高出12.8%。

英文摘要:

Cache plays a critical role in reducing the performance gap between CPU and main memory. A modern multi-core CPU generally employs a multi-level hierarchy of caches, through which the most recently and frequently used data are maintained in each core's local private caches while all cores share the last-level cache (LLC). For inclusive caches, clean cache lines replaced in higher-level caches are not necessarily copied back to lower levels, as the inclusiveness implies their existences in lower levels. For exclusive and non-inclusive caches that are widely utilized by Intel, AMD, and ARM today, either indiscriminately copying back all or none of replaced clean cache lines to lower levels raises no violation to exclusiveness and non-inclusiveness definitions. We have conducted a quantitative study and found that, copying back all or none of clean cache lines to lower-level cache of exclusive caches entails suboptimal performance. The reason is that only a part of cache lines would be reused and others turn to be dead in a long run. This observation motivates us to selectively copy back some clean cache lines to LLC in an architecture of exclusive or non-inclusive caches. We revisit the concept of reuse distance of cache lines. In a nutshell, a clean cache line with a shorter reuse distance is copied back to lower-level cache as it is likely to be re-referenced in the near future, while cache lines with much longer reuse distances would be discarded or sent to memory if they are dirty. We have implemented and evaluated our proposal with non-volatile (STT-MRAM) LLC. Experimental results with gem5 and SPEC CPU 2017 benchmarks show that on average our proposal yields up to 12.8% higher throughput of IPC (instructions per cycle) than the least-recently-used (LRU) replacement policy with copying back all clean cache lines for STT-MRAM LLC.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑