【24h】

Why Nothing Matters: The Impact of Zeroing

机译:为什么什么都不重要:归零的影响

获取原文
获取原文并翻译 | 示例

摘要

Memory safety defends against inadvertent and malicious misuse of memory that may compromise program correctness and security. A critical element of memory safety is zero initialization. The direct cost of zero initialization is surprisingly high: up to 12.7%, with average costs ranging from 2.7 to 4.5% on a high performance virtual machine on IA32 architectures. Zero initialization also incurs indirect costs due to its memory bandwidth demands and cache displacement effects. Existing virtual machines either a) minimize direct costs by zeroing in large blocks, or b) minimize indirect costs by zeroing in the allocation sequence, which reduces cache displacement and bandwidth. This paper evaluates the two widely used zero initialization designs, showing that they make different tradeoffs to achieve very similar performance. Our analysis inspires three better designs: (1) bulk zeroing with cache-bypassing (non-temporal) instructions to reduce the direct and indirect zeroing costs simultaneously, (2) concurrent non-temporal bulk zeroing that exploits parallel hardware to move work off the application's critical path, and (3) adaptive zeroing, which dynamically chooses between (1) and (2) based on available hardware parallelism. The new software strategies offer speedups sometimes greater than the direct overhead, improving total performance by 3% on average. Our findings invite additional optimizations and microarchitectural support.
机译:内存安全可以防止对内存的无意和恶意滥用,这可能会损害程序的正确性和安全性。内存安全的关键要素是初始化为零。零初始化的直接成本令人惊讶地高:高达12.7%,在IA32架构上的高性能虚拟机上,平均成本在2.7%至4.5%之间。零初始化还由于其内存带宽需求和缓存移位影响而导致间接成本。现有的虚拟机要么a)通过在大块中置零来最大程度地减少直接成本,要么b)通过在分配序列中置零来最大程度地减少间接成本,这减少了缓存的移位和带宽。本文评估了两种广泛使用的零初始化设计,表明它们进行了不同的权衡以实现非常相似的性能。我们的分析激发了三个更好的设计:(1)使用绕过高速缓存(非时间)指令的批量调零,以同时降低直接和间接调零成本;(2)并发非时间批量调零,利用并行硬件将工作移出应用程序的关键路径,以及(3)自适应调零,后者根据可用的硬件并行性在(1)和(2)之间动态选择。新的软件策略提供的加速有时比直接开销要大,平均总性能提高了3%。我们的发现邀请其他优化和微体系结构支持。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号