Announcement

Collapse
No announcement yet.

Disable TLB fix on phenoms

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disable TLB fix on phenoms

    Hi,

    I've got a phenom with the TLB problem and a motherboard without an option to disable the TLB fix. I didn't want to have to patch the kernel source to disable it, so I figured out it was enough to twiddle some MSR bits.

    Here is a script that turns off the TLB fix:

    Code:
    #!/bin/bash
    
    MSR1=0xC0010015
    MSR2=0xC0011023
    
    if [ ! -d /dev/cpu ]; then
        modprobe msr
    fi
    
    for i in /dev/cpu/*; do
    
       CPU=$(basename $i)
       VAL=$(rdmsr -p $CPU -u $MSR1)
       wrmsr -p $CPU $MSR1 $(( VAL &= ~(1 << 3) ))
       VAL=$(rdmsr -p $CPU -u $MSR2)
       wrmsr -p $CPU $MSR2 $(( VAL &= ~(1 << 1) ))
    
    done
    It uses the msr tools from here:
    http://www.kernel.org/pub/linux/utils/cpu/msr-tools/

    Be careful of the msr-tools Debian package. It isn't compiled correctly. It works ok using 64 bit, but 32 bit is broken. I've filed bug #495445 for it.

    Benchmarks are here to make sure it is working
    http://global.phoronix-test-suite.co...21-31493-11066

  • #2
    Most BIOS's have an option to disable the microcode updates, this will kill the harmful TLB fix. The BIOS fix itself has a nasty impact on performance. There is a kernel patch floating around that fixes the bug without any performance impact at all. I'm not sure if the MSR stuff you did will disable the 'fix' that the BIOS microcode provides.

    Comment

    Working...
    X