《电子技术应用》
您所在的位置:首页 > 模拟设计 > 设计应用 > 基于空间访存规律的数据和页表联合硬件预取设计
基于空间访存规律的数据和页表联合硬件预取设计
电子技术应用
冯烁,路冬冬,尹飞,杨剑新,李涛
上海高性能集成电路设计中心
摘要: 现代高性能处理器的发展日新月异,但是处理器芯片设计所面临的技术难题也愈发凸显。访存代价的急剧上升和虚实地址代换的大量开销,不可避免地会影响程序运行的整体性能。硬件数据预取是一种提高Cache命中率的有效方法,能够大幅减少访存延迟。首先介绍基于模式规律和基于程序执行的两种数据预取类型,简要分析基于时间关联性、空间关联性、指针检测的预取三种预取形式,着重讨论以Delta预取和Footprint预取为代表的典型空间预取器设计,并给出具体实现的对比分析。在此基础上,提出一种数据和页表联合硬件预取设计的初步方案,其核心思想是充分利用页表的访存地址规律,实现基于页表预取之上的数据预取,从而进一步提升现有空间数据预取器的性能。
中图分类号:TN402;TP338.8 文献标志码:A DOI: 10.16157/j.issn.0258-7998.257651
中文引用格式: 冯烁,路冬冬,尹飞,等. 基于空间访存规律的数据和页表联合硬件预取设计[J]. 电子技术应用,2026,52(10):155-163.
英文引用格式: Feng Shuo,Lu Dongdong,Yin Fei,et al. A joint hardware prefetching design of data cache and page tables based on spatial memory correlations[J]. Application of Electronic Technique,2026,52(10):155-163.
A joint hardware prefetching design of data cache and page tables based on spatial memory correlations
Feng Shuo,Lu Dongdong,Yin Fei,Yang Jianxin,Li Tao
Shanghai High Performance Integrated Circuit Design Center
Abstract: The development of modern high-performance processors is making remarkable progress on a daily basis, while the technical challenges and problems resided in CPU architectures or microarchitectures faced by chip designers are also getting severer than ever. For example, the cost of main memory access is raising dramatically, and the latency for address translation is overwhelming, which would inevitably affect the overall performance of program executions for high-performance processors. Among others, hardware prefetching is an effective method to improve the ratio of data cache hit, resulting in a much narrowed and tolerable memory access latency. In this paper, an introduction on the pattern-based data prefetching and execution-based data prefetching is given firstly, a brief analysis on the temporal, spatial, and pointer-detection prefetching is provided, a thorough discussion is dedicated to the methods of delta prefetching and footprint prefetching, and the comparison of design details between a few representative spatial data prefetchers is summarized. Moreover, this paper proposes a joint hardware prefetching design of data cache and page tables, whose key idea is to fully exploit the spatial memory correlations of page tables, and implement the data prefetching based on the page-table prefetching, for the purpose of further improving the performance of existing spatial data prefetching methods.
Key words : CPU architecture;microarchitecture design;hardware data prefetching;address translation;spatial memory correlations

引言

现代高性能处理器的发展日新月异,在计算性能、工作频率、处理功耗、功能支持等多个方面,不断取得显著的进步和提升。但是,处理器芯片的设计日趋复杂,所面临的技术难题也愈发凸显。一方面,芯片架构不断演变,芯片内集成的核心数量越来越多,芯片可支持的内存空间越来越大,存储器访问请求及响应、数据一致性处理等开销也越来越大。尤其是在多芯粒集成架构下,一次读访存操作延伸的各类请求和响应还会出现多次跨芯粒传输的情况,访存代价更是急剧上升。另一方面,面对大数据和大模型等应用,程序跨页面粒度的访问更加频繁,虚实地址代换的各级缓冲可达到的命中率较为有限,因而大量的页表访问只能从主存中读取,使得虚实地址代换的时间开销非常大,最终也不可避免地会影响程序运行的整体性能。

为了缩短普通访存指令的访存延迟,集成多个处理器核心及加速器部件的处理器芯片通常在核心内外集成多个层级的数据Cache。命中各级数据Cache的延迟远小于主存访问延迟,因此提高Cache的命中率,可有效缩短平均访存延迟,显著提高核心和加速器的访存带宽。硬件数据Cache预取是一种提高Cache命中率的有效方法,其本质是识别访存地址中蕴含的各种规律,推测式地将后续可能访问的数据提前装入Cache中。评价Cache预取优劣的方法有多种,常见的评估指标包括预取覆盖率、预取准确度、预取及时性等方面,从不同角度对预取效果进行分析和评价。

本文首先介绍基于模式规律和基于程序执行的两种数据预取类型,简要分析基于时间关联性的预取、基于空间关联性的预取、基于指针检测的预取三种模式规律类型的预取形式,着重讨论以Delta预取和Footprint预取为代表的典型空间预取器设计,并给出具体实现的对比分析。在此基础上,本文提出一种数据和页表联合硬件预取设计的初步方案,其核心思想是充分利用页表的访存地址规律,实现基于页表预取之上的数据预取,从而进一步提升现有空间数据预取器的性能。


本文详细内容请下载:

http://www.chinaaet.com/resource/share/2000007307


作者信息:

冯烁,路冬冬,尹飞,杨剑新,李涛

(上海高性能集成电路设计中心,上海 201204)

2.jpg

此内容为AET网站原创,未经授权禁止转载。