以编程方式禁用AMD系统上的硬件预取 [英] programmatically disable hardware prefetching on AMD systems

查看:167
本文介绍了以编程方式禁用AMD系统上的硬件预取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一种方法可以像在Intel系统中那样以编程方式禁用AMD系统上的硬件预取程序,如

is there a way to programmatically disable the hardware prefetcher on an AMD system like you can in an Intel system as discussed in this topic

专门用于AMD Opteron Barcelona或Istanbul架构.

Specifically for the AMD Opteron Barcelona or Istanbul architecture.

推荐答案

所有AMD系列10h处理器(包括巴塞罗那和伊斯坦布尔)都有两个不同的硬件预取器.

All AMD Family 10h processors (including Barcelona and Istanbul) have two different hardware prefetchers.

  1. 第一个是传统的数据高速缓存预取器,它可以识别高速缓存行访问的连续或连续流.可以通过将MSRC001_1022的位13设置为"1"来禁用它.

  1. The first is the traditional data cache prefetcher that recognizes contiguous streams of either ascending or descending cache line accesses. It can be disabled by setting bit 13 of MSRC001_1022 to "1".

另一个硬件预取器是内存控制器预取器".这是一个较为通用的预取程序,但仅在内存控制器内运行(即,它不会将预取的数据发送到内核-只是使内存控制器可以在内核请求时更快地将其返回).

The other hardware prefetcher is the "memory controller prefetcher". This is a somewhat more general prefetcher, but only operates within the memory controller (i.e., it does not send the prefetched data to a core -- it just enables the memory controller to return it more quickly when the core requests it).

  • 此预取器的主要控制在PCI配置空间中,功能2,偏移量11Ch,附加功能在功能2中,偏移量在巴塞罗那之后的处理器,偏移量1B0h.
  • 我已经通过/dev/mem设备驱动程序更新了PCI配置空间中的值,从而在实时"巴塞罗那系统上禁用和重新启用了该预取器,并取得了成功. (不要在家尝试!)
  • 硬件性能计数器事件1F0h(带有UnitMask 02和04)显示了内存控制器预取器的活动.
  • 请注意,上海/伊斯坦布尔/MagnyCours的内存控制器预取器一致地"运行(意味着高速缓存一致性探测器操作与内存预取一起发出),而巴塞罗那的内存控制器预取器不发出高速缓存一致性操作(它们在核心对缓存行的请求到达内存控制器之前,不会发出该消息.

上面的内容记录在《 BIOS和内核10h系列处理器的内核开发人员指南》中: http ://support.amd.com/us/Processor_TechDocs/31116.pdf

The stuff above is documented in the BIOS and Kernel Developer's Guide for Family 10h processors: http://support.amd.com/us/Processor_TechDocs/31116.pdf

这篇关于以编程方式禁用AMD系统上的硬件预取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆