It is generally observed that the fraction of live lines in shared last-level caches (SLLC) is very small for chip multiprocessors (CMPs). This can be tackled using promotion-based replacement policies like re-reference interval prediction (RRIP) instead of LRU, dead-block predictors, or reuse-based cache allocation schemes. In GPU systems, similar LLC issues are alleviated using various cache bypassing techniques. These issues are worsened in heterogeneous CPU-GPU systems because the two processors have different data access patterns and frequencies. GPUs generally work on streaming data, but have many more threads accessing memory as compared to CPUs. As such, most traditional cache replacement and allocation policies prove ineffective due to the higher number of cache accesses in GPU applications, resulting in higher allocation for GPU cache lines, despite their minimal reuse. In this work, we implement the Reuse Cache approach for heterogeneous CPU-GPU systems. The reuse cache is a decoupled tag/data SLLC which is designed to only store the data that is being accessed more than once. This design is based on the observation that most of the cache lines in the LLC are stored but do not get reused before being replaced. We find that the reuse cache achieves within 0.5% of the IPC gains of a statically partitioned LLC, while decreasing the area cost of the LLC by an average of 40%.
Fast Modeling L2 Cache Reuse Distance Histograms Using Combined Locality Information from Software Traces
为了缓解CPU和主存之间的性能差距,多级缓存体系结构被广泛应用于现代处理器中。因此,在设计空间探索(DSE)的早期阶段,对下游缓存的行为进行建模成为处理器性能评估的一个关键部分。本文提出了一种快速、准确的二级缓存重用距离直方图模型,可用于预测一级缓存使用LRU替换策略、二级缓存使用LRU/随机替换策略的多级缓存架构的行为。我们使用了L1重用距离直方图和两个新提出的度量,即可扩展表和Hit-RDH,描述了更详细的信息的软件跟踪作为输入。对于给定的L1高速缓存配置,分析结果可以重新用于L2高速缓存的不同配置。我们的模型的输出是L2缓存重用距离直方图,在此基础上,L2缓存未命中率可以评估。我们将L2缓存未命中率与从SPEC CPU 2006中选择的15个基准测试和从SPEC CPU 2017中选择的9个基准测试的gem 5周期精确模拟结果进行了比较。平均绝对误差小于5%,而对于四个L2缓存候选者,每个L2配置的评估时间可以加快近30倍。
Reuse Distance-based Copy-backs of Clean Cache Lines to Lower-level Caches
缓存在缩小CPU和主存之间的性能差距方面起着至关重要的作用。现代多核CPU通常采用多级缓存层次结构,通过该结构,最近和频繁使用的数据被维护在每个核的本地私有缓存中,而所有核共享最后一级缓存(LLC)。对于包含性高速缓存,在较高级别高速缓存中替换的干净高速缓存行不一定被复制回较低级别,因为包含性意味着它们存在于较低级别中。对于当今被Intel、AMD和ARM广泛使用的独占和非包含高速缓存,不加区别地将所有或不将替换的干净高速缓存行复制回较低级别不会违反独占性和非包含性定义。我们已经进行了定量研究,并发现,复制回所有或没有干净的高速缓存线,以较低级别的高速缓存的排他缓存需要次优的性能。其原因是,只有一部分缓存线将被重用,而其他人变成死在长期运行。这种观察促使我们选择性地将一些干净的高速缓存行复制回独占或非独占高速缓存架构中的LLC。我们重新讨论了高速缓存线的重用距离的概念。简而言之,具有较短重用距离的干净高速缓存行被复制回较低级别高速缓存,因为它可能在不久的将来被重新引用,而具有长得多的重用距离的高速缓存行将被丢弃或发送到存储器,如果它们是脏的。我们已经实施和评估了我们的建议与非易失性(STT-MRAM)有限责任公司。使用gem 5和SPEC CPU 2017基准测试的实验结果表明,平均而言,我们的建议比最近最少使用(LRU)替换策略(为STT-MRAM LLC复制所有干净的高速缓存行…
HyDRA: Deadline and Reuse-Aware Cacheability for Hardware Accelerators
Amar Nath and Shashi Khosla School of Information Technology, Indian Institute of Technology Delhi(印度德里理工学院阿马尔·纳特和沙希·科斯拉信息技术学院);Department of Computer Science and Engineering, Indian Institute of Technology Delhi(印度德里理工学院计算机科学与工程系)
Adaptive KV Cache Reuse for Fast Long-Context LLM Serving
School of Computer Science and Technology, Xi’an Jiaotong University(西安交通大学计算机科学与技术学院);School of Computer Science and Technology, Huazhong University of Science and Technology(华中科技大学计算机科学与技术学院)