一句话:首次剖析 GPU 页错误批处理串行化问题,并提出批量感知的统一内存软硬件方案。
现代 GPU 的统一虚拟内存与按需分页为大规模应用提供便利抽象,但页错误处理开销高昂。本文首次系统分析 GPU 页错误处理的主要低效:批量处理大量页错误虽摊薄开销,却引入大规模串行化,严重损害执行吞吐。作者基于真机测量,提出一种 GPU 运行时软硬件方案:通过支持类 CPU 的线程块上下文切换增大批大小并减少批次数;在不改硬件的前提下,将页面驱逐移出关键路径,与 CPU 到 GPU 的页面迁移重叠。评估显示,相较最先进预取平均加速 2 倍,批大小增至 2.27 倍,总批次数减少 51%,平均批处理时间降低 27%。
While unified virtual memory and demand paging in modern GPUs provide convenient abstractions to programmers for working with large-scale applications, they come at a significant performance cost. We provide the first comprehensive analysis of major inefficiencies that arise in page fault handling mechanisms employed in modern GPUs. To amortize the high costs in fault handling, the GPU runtime processes a large number of GPU page faults together. We observe that this batched processing of page faults introduces large-scale serialization that greatly hurts the GPU's execution throughput. We show real machine measurements that corroborate our findings. Our goal is to mitigate these inefficiencies and enable efficient demand paging for GPUs. To this end, we propose a GPU runtime software and hardware solution that (1) increases the batch size (i.e., the number of page faults handled together), thereby amortizing the øverheadName time, and reduces the number of batches by supporting CPU-like thread block context switching, and (2) takes page eviction off the critical path with no hardware changes by overlapping evictions with CPU-to-GPU page migrations. Our evaluation demonstrates that the proposed solution provides an average speedup of 2x over the state-of-the-art page prefetching. We show that our solution increases the batch size by 2.27x and reduces the total number of batches by 51% on average. We also show that the average batch processing time is reduced by 27%.
DOI 原文 ·
@inproceedings{paperbot5473,
title = {Batch-Aware Unified Memory Management in GPUs for Irregular Workloads},
author = {Hyojong Kim and Jaewoong Sim and Prasun Gera and Ramyad Hadidi and Hyesoon Kim},
booktitle = {ASPLOS},
year = {2020},
doi = {10.1145/3373376.3378529}
}