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

暴露影子分支

Exposing Shadow Branches

Chrysanthos Pepi, Bhargav Reddy Godala, Krishnam Tibrewala, Gino Chacon, Paul V. Gratz, Daniel A. Jiménez, Gilles A. Pokam, David I. August

AI总结:

针对FDIP中BTB未命中导致前端停顿的问题,提出Skeia技术,通过解码缓存行中被忽略的“影子分支”并存入SBB,在极小存储开销下显著提升了处理器前端性能。

摘要:

现代处理器以Fetch Directed Instruction Prefetching (FDIP)的形式实现解耦前端,以避免前端停顿。FDIP由Branch Prediction Unit (BPU)驱动,依赖BPU的准确性和分支目标跟踪结构,将指令推测性地预取到Instruction Cache (L1I)中。随着数据中心应用变得愈发复杂,其代码占用空间也随之增长,导致Branch Target Buffer (BTB)的未命中率上升。FDIP能够缓解L1I缓存未命中,但当遇到BTB未命中时,BPU可能无法向FDIP识别当前指令为分支。这可能阻碍FDIP进行预取,或导致其沿错误路径进行推测,进一步污染L1I缓存。我们观察到,绝大多数(75%)BTB未命中且未识别的分支实际上存在于FDIP先前已预取的指令缓存行中,但这些缺失的分支尚未被解码并插入BTB。这是因为指令行从入口点(即上一个被采纳分支的目标)解码至出口点(该被采纳分支)。我们将存在于缓存行中被忽略部分的分支指令称为“Shadow Branches”。在此我们提出Skeia,一种新颖的影子分支解码技术,它识别并解码FDIP预取的缓存行中未使用的字节,将其插入Shadow Branch Buffer (SBB)。SBB与BTB并行访问,允许FDIP在BTB未命中时仍能进行推测。凭借12.25KB的最小存储状态,Skeia在16个前端受限的应用上,相较于8K条目的BTB(78KB)实现了约5.7%的几何平均加速,相较于向BTB添加等量状态实现了约2%的加速。由于与相似大小的BTB相比,存储在SBB中的许多分支是独有的,我们在所有检查的规模下持续观察到Skeia带来更大的性能提升,直至饱和。

英文摘要:

Modern processors implement a decoupled front-end in the form of Fetch Directed Instruction Prefetching (FDIP) to avoid front-end stalls. FDIP is driven by the Branch Prediction Unit (BPU), relying on the BPU's accuracy and branch target tracking structures to speculatively fetch instructions into the Instruction Cache (L1I). As data center applications become more complex, their code footprints also grow, resulting in an increase in Branch Target Buffer (BTB) misses. FDIP can alleviate L1I cache misses, but when it encounters a BTB miss, the BPU may not identify the current instruction as a branch to FDIP. This can prevent FDIP from prefetching or cause it to speculate down the wrong path, further polluting the L1I cache. We observe that the vast majority, 75%, of BTB-missing, unidentified branches are actually present in instruction cache lines that FDIP has previously fetched but, these missing branches have not yet been decoded and inserted into the BTB. This is because the instruction line is decoded from an entry point (which is the target of the previous taken branch) till an exit point (the taken branch). Branch instructions present in the ignored portion of the cache line we call them "Shadow Branches". Here we present Skeia, a novel shadow branch decoding technique that identifies and decodes unused bytes in cache lines fetched by FDIP, inserting them into a Shadow Branch Buffer (SBB). The SBB is accessed in parallel with the BTB, allowing FDIP to speculate despite a BTB miss. With a minimal storage state of 12.25KB, Skeia delivers a geomean speedup of ~5.7% over an 8K-entry BTB (78KB) and ~2% versus adding an equal amount of state to the BTB across 16 front-end bound applications. Since many branches stored in the SBB are unique compared to those in a similarly sized BTB, we consistently observe greater performance gains with Skeia across all examined sizes until saturation.

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

↑