传统的缓存替换策略,如广泛使用的LRU算法,在程序工作集大于缓存容量的情况下,不能有效开发流式数据的重用性,导致缓存性能很差.文中提出一种流特性制导的缓存分配策略(SAGA).该策略利用流检测引擎来发掘程序中的流特性信息,进而动态地在发生缓存缺失时指导是否为缺失数据分配缓存块,最终提高数据缓存的性能.实验表明,对于SPEC2000FP程序集,在1MB缓存上,比较于LRU策略,使用SAGA策略时缓存的缺失平均减少了31%,程序平均CPI降低4%.
Traditional cache replacement schemes such as the commonly used LRU policy often fail to exploit reuse of stream data when the working set size of the application is bigger than the cache size,resulting in poor cache performance.In this paper,the data cache performance is improved by enhancing LRU policy with a novel Stream Attribute Guided Cache Allocation(SAGA) policy,which dynamically utilizes streaming information in applications detected by stream engines on microprocessors to guide whether allocate a new cache line or not when a cache miss occurs.Experiments show that SAGA outperforms LRU by 31% in terms of cache misses and 4% in terms of CPI for SPEC2000FP benchmark on a 1MB cache.