English 中文(简体)
programmatically disable hardware prefetching on AMD systems
原标题:

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

Specifically for the AMD Opteron Barcelona or Istanbul architecture.

最佳回答

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

  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".

  2. 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).

    • The primary control for this prefetcher is in PCI configuration space, Function 2, offset 11Ch, with additional control in Function 2, offset 1B0h for the processors after Barcelona.
    • I have had success in disabling and re-enabling this prefetcher on a "live" Barcelona system by updating the values in PCI configuration space via the /dev/mem device driver. (Don t try this at home!)
    • The activity of the memory controller prefetcher is shown by the hardware performance counter event 1F0h, with UnitMasks 02 and 04.
    • Note that the memory controller prefetcher for Shanghai/Istanbul/MagnyCours operates "coherently" (meaning that cache coherence probe operations are issued along with the memory prefetches), while the memory controller prefetcher in Barcelona does not issue cache coherence operations (they don t get issued until the core s request for the cache line arrives at the memory controller).

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

问题回答

use the msr tools to change the DC_CFG bits as specified in the AMD support document on p407

http://support.amd.com/us/Processor_TechDocs/31116.pdf





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签