作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2006, Vol. 32 ›› Issue (8): 102-104.

• 软件技术与数据库 • 上一篇    下一篇

一个由编译器控制的 Cache 替换策略

杜红燕 1,田兴彦2,田新华2   

  1. 1. 长沙大学计算机科学与工程系,长沙 410003;2. 国防科学技术大学计算机学院,长沙 410073
  • 出版日期:2006-04-20 发布日期:2006-04-20

A Compiler-assisted Cache Replacement Policy

DU Hongyan1, TIAN Xingyan2, TIAN Xinhua2   

  1. 1. Department of Computer Science and Engineering, Changsha University, Changsha 410003;2. School of Computer Science, National University of Defense Technology, Changsha 410073
  • Online:2006-04-20 Published:2006-04-20

摘要: 由于Cache 污染问题,传统的仅由硬件控制的Cache 替换策略不能得到令人满意的Cache 利用率。为解决该问题,EPIC 引入了Cache 提示以辅助控制Cache 替换。文章提出了一个由编译器辅助控制的Cache 替换策略:最优Cache 划分(OCP)。OCP Cache 替换策略简化了Cache 行为和Cache 失效分析方法。实验结果表明,OCP Cache 替换策略能有效地降低Cache 失效率。

关键词: Cache 提示;Cache 行为分析;编译优化

Abstract: Recent research results show that conventional hardware-only cache replacement policies result in unsatisfactory cache utilization because of cache pollution. To overcome this problem, cache hints are introduced to assist cache replacement. Cache hints are used to specify the cache level at which the data is stored after accessing it. This paper presents a compiler-assisted cache replacement policy, optimum cache partition(OCP), which can be carried out through cache hints and LRU replacement policy. The OCP replacement policy results in plain cache behaviors, and makes cache misses analyzing and optimizing easily and efficiently. OCP replacement policy has been implemented in the compiler test-bed and evaluated on a set of scientific computing benchmarks. Initial results show that the approach is effective on reducing the cache miss rate

Key words: Cache hint; Cache behavior analysis; Compiler optimization