Page 1 of 6 1234 ... LastLast
Results 1 to 25 of 133

Thread: Howto disable the tlb-fix with CrystalCPU

  1. #1
    Xtreme Addict
    Join Date
    Sep 2007
    Location
    Munich, DE
    Posts
    1,401

    Howto disable the tlb-fix with CrystalCPU

    The new K10 has two Erratas related to TLB caching.

    The first errata #254 is already docuentend in the K10 Revision Guide Version 3.0

    http://www.amd.com/us-en/assets/cont...docs/41322.pdf



    You can see the recommended fix is to clear the Bit Nr 3. in the MSR Register C0010015h and Bit Nr. 1. in the MSR Register C0011023h.

    The second errata #298 was found short after phenoms where released. AMD prepared a workaround for Linux kernel and published a patch at the x86-64 mailing list.

    Here is the description of the errata
    https://www.x86-64.org/pipermail/dis...er/010259.html

    This is the post including the patch
    https://www.x86-64.org/pipermail/dis...er/010260.html

    This part of the patch modifies the involved MSR registers to disable the TLB-fix if applied via bios.
    /* enable workaround for AMD Erratum 298 if necessary */
    + if ((c->x86 == 0x10) && (c->x86_model < 3) && (c->x86_mask != 3)) {
    + /* re-enable TLB caching if BIOS disabled it */
    + rdmsrl(MSR_K8_HWCR, value);
    + value &= ~(1UL << 3);
    + wrmsrl(MSR_K8_HWCR, value);
    + rdmsrl(0xC0011023, value);
    + value &= ~(1UL << 1);
    + wrmsrl(0xC0011023, value);
    + /* enable OS workaround */
    + e298_bug = 1;
    + printk(KERN_INFO "AMD erratum 298 workaround enabled\n");
    + }
    MSR_K8_HWCR (Hardware configuration register) is the C0010015 register
    What the code does is reading the two registers and setting exactly those bit's the #254 workaround recommends and write the values back to the registers.
    After that it prints the message "AMD erratum 298 workaround enabled" to the kernel log.
    The kernel log includes this line four times after startup so I assume it's applied to the MSR register of each core.

    Note: A few users reported they had lookup's under heavy load whom here gone after they applied the kernel patch. They did not use virtualisation, so the errata is not an virtualisation only issue.

    On Windows OSes there is no Hotfix available doing this workaround.
    If you own a motherboard with an Bios which deactivates the TLB-Cache (TLB-Fix applied) and you can not use AOD to reenable it you can use one of the two following methods.

    1. Manual way via CrsytalCPU.

    Download and install CrystalCPU from here.

    On the CrystalCPU's main Windows you can select the core with a dropdown in the upper right corner.


    Apply the following steps to each core.

    Select the Core in the main window.

    Start the MSR-Editor


    Enter C0010015 in the MSR Number field and hit RDMSR.
    Change the last hex digit. Bit Nr. 3 (8h) must be unset. If the last digit is 8h use 0h if it's 9h use 1h. Hit WRMSR to apply the changes.


    Now enter C0011023 in the MSR Number field and hit RDMSR.
    Change the last hex digit. Bit Nr. 1 (2h) must be unset. If the last digit is 2h change it to 0h. Hit WRMSR to apply the changes.


    Close the MSR Editor, select the next core start the MSR editor and change the registers the same way as described above.

    2. Automated via a Script for RW-Everything

    User mibo pointed to a much more convenient way to change the registers. Here is his Howto

    Quote Originally Posted by mibo View Post
    I found a very cool program - RW-Everything:
    http://jacky5488.myweb.hinet.net/download.html

    Installed v0.28 and put the following batch file together. With the command line option in the link the batch file writes the 2x4 values to the msr automatically. This works on my ASUS M2A VM.
    I did not understand the syntax of the rdmsr command and how to mask the bits of the eax register. So the batch file simply writes the values without reading and bitmasking them before.

    file: TLB_fix_disable_CMD.rw
    Code:
    >cpu 1
    >wrmsr 0xc0010015 0 0x01000010
    >wrmsr 0xc0011023 0 0x00200020
    >cpu 2
    >wrmsr 0xc0010015 0 0x01000010
    >wrmsr 0xc0011023 0 0x00200020
    >cpu 3
    >wrmsr 0xc0010015 0 0x01000010
    >wrmsr 0xc0011023 0 0x00200020
    >cpu 4
    >wrmsr 0xc0010015 0 0x01000010
    >wrmsr 0xc0011023 0 0x00200020
    >rwexit
    file: TLB-fix-disable.lnk
    Code:
    C:\Programme\RW-Everything\RW /Command=TLB_fix_disable_CMD.rw /Logfile=logfile.txt
    "Programme" is probably "program files" on your computer.
    wibo's updates script
    Code:
    >cpu 1
    >rdmsr 0xc0010015
    >LocalA = AND LocalA 0xfffffff7
    >wrmsr 0xc0010015 LocalD LocalA
    >rdmsr 0xc0011023
    >LocalA = AND LocalA 0xfffffffd
    >wrmsr 0xc0011023 LocalD LocalA
    
    >cpu 2
    >rdmsr 0xc0010015
    >LocalA = AND LocalA 0xfffffff7
    >wrmsr 0xc0010015 LocalD LocalA
    >rdmsr 0xc0011023
    >LocalA = AND LocalA 0xfffffffd
    >wrmsr 0xc0011023 LocalD LocalA
    
    >cpu 3
    >rdmsr 0xc0010015
    >LocalA = AND LocalA 0xfffffff7
    >wrmsr 0xc0010015 LocalD LocalA
    >rdmsr 0xc0011023
    >LocalA = AND LocalA 0xfffffffd
    >wrmsr 0xc0011023 LocalD LocalA
    
    >cpu 4
    >rdmsr 0xc0010015
    >LocalA = AND LocalA 0xfffffff7
    >wrmsr 0xc0010015 LocalD LocalA
    >rdmsr 0xc0011023
    >LocalA = AND LocalA 0xfffffffd
    >wrmsr 0xc0011023 LocalD LocalA
    >rwexit
    Note: I recommend you check the actual values of your MSR registers and modify the script in case the last digit of register C0010015 is different from 8h or the last digit of register C0011023 is different from 2h. Some mobos have Bit Nr. 0 set in register C0010015.

    3. Sam2008's Phenom TLB Disable Tool and Phenom MSR tweaking tool

    Most convenient nowadays is this Tool

    Quote Originally Posted by sam2008 View Post
    Phenom TLB Disable Tool [Update Version 1.04]
    Finally finished the GUI version of TLB disabling program. It is useful when you mobo BIOS doesn't has option to disable the TLB walkaround. And it is also useful if you are using Vista SP1 which enabled the TLB after boot up even if you disable the TLB in the BIOS. Added GUI interface, and user can choose to automatically close the window after successful applying of patch. The default time for closing the window is 8 seconds. You can also change the default in the INI file.

    You will need to put the program in the same directory as CrystalCPUID (x86 version, NOT the x64 version) to run the program. In Vista, you also need to run as administrator. For how to setup the program so that it starts automatically with Vista see here. You can also use that link for older versions of the program and how to use the program and how to do the benchmarking.

    Works for XP, Vista32/64



    USE AT YOUR OWN RISK!!!

    Download
    TLB ver 1.04.RAR

    If you are experiencing VCL.bpl dynamic library problem trying using the following download. It has all the required dynamic library built in but slightly large in size (260KB download).
    TLB_ver1.04.RAR with Built in Dynamic Libraries

    [Update v1.05]
    Fixed icons, and updated the TLB patch enable tool.
    TLB ver 1.05.RAR
    Read more ...

    ------------- old post ----------------
    Hi,

    Guess i found a way to disable the tlb fix if aod does not work and there is no option in the bios.

    The latest bios for my M2A-VM included the tlb-fix. My everest memory read bandwidth dropped around 20&#37;.

    I expected bit nr 3 in the MSR register C0010015 to be responsible for the fix. So I compared the values between the two bios versions.

    The old version showed 0x00000000 0x01000010 the new one 0x00000000 0x01000018 (bit nr 3 set).

    The good thing one can use CrytalCPU's MSR Editor to disable the fix by changing that bit (...18->...10). At least it works on my board.

    I could not enable the fix with the old bios by changing the bit. With the new bios i can turn it on and off on runtime.

    Here are two screenies showing the MSR-Editor and the everest results.
    TLB-Buffer enabled (no fix)

    TLB-Buffer disabled (fix)


    Description about what that bit controls from "AMD Family 10h Processor BKDG" p. 136
    TlbCacheDis: cacheable memory disable. Read-write. 1=Disable performance improvement that assumes that the PML4, PDP, PDE and PTE entries are in cacheable memory. Operating systems that maintain page tables in uncacheable memory (UC memory type) must set the TlbCacheDis bit to insure proper operation.
    Last edited by justapost; 04-13-2008 at 10:32 AM.

  2. #2
    Xtreme Addict
    Join Date
    Nov 2002
    Location
    MA.
    Posts
    1,783

    Thumbs up

    Good find!!

    Seems that may be needed, as I still see some folks having troubles with AOD...and as you know, if the bios doesn't allow turning it off... then ya screwed!!
    Zen2 Has brought AMD back!

  3. #3
    D.F.I Pimp Daddy
    Join Date
    Jan 2007
    Location
    Still Lost At The Dead Show Parking Lot
    Posts
    5,182
    D.F.I Bios has that option
    SuperMicro X8SAX
    Xeon 5620
    12GB - Crucial ECC DDR3 1333
    Intel 520 180GB Cherryville
    Areca 1231ML ~ 2~ 250GB Seagate ES.2 ~ Raid 0 ~ 4~ Hitachi 5K3000 2TB ~ Raid 6 ~

  4. #4
    Xtreme Addict
    Join Date
    Nov 2002
    Location
    MA.
    Posts
    1,783
    It should wash my car for $250
    Zen2 Has brought AMD back!

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    29
    Good find justapost it worked on my Mobo too

  6. #6
    Xtreme Addict
    Join Date
    Sep 2007
    Location
    Munich, DE
    Posts
    1,401
    Quote Originally Posted by muzz View Post
    Good find!!

    Seems that may be needed, as I still see some folks having troubles with AOD...and as you know, if the bios doesn't allow turning it off... then ya screwed!!
    Thanks, it looks like AOD does not work on 770 chipset's and probably never will work on AM2 chipsets.
    Looking for a way to write to /dev/cpu/*/msr under linux to disable the fix there too.
    Quote Originally Posted by jnrjim67 View Post
    Good find justapost it worked on my Mobo too
    Great, glad to see it works on other mobo's.

  7. #7
    Xtreme Mentor
    Join Date
    May 2007
    Posts
    2,792
    Nice find!

    Do you have to do this at every bootup?
    Do you have to repeat it if you clear CMOS?
    Doesn't "10" just stand for enable TLB caching?

    Thats what AOD button does for us.

  8. #8
    Xtreme Addict
    Join Date
    Sep 2007
    Location
    Munich, DE
    Posts
    1,401
    Quote Originally Posted by KTE View Post
    Nice find!

    Do you have to do this at every bootup?
    Do you have to repeat it if you clear CMOS?
    Have not tried it with 1604 bios but with 1603 the value did not survive a reboot.
    Quote Originally Posted by KTE View Post
    Doesn't "10" just stand for enable TLB caching?
    10h must be set if the L3 cache is enabled according to the guide
    08h disables TLB caching.
    Quote Originally Posted by KTE View Post
    Thats what AOD button does for us.
    M3A just arrived here (ordered it five weeks ago and i'm not really interested anymore).
    AOD beta starts and if i hit that button now it changes this bit (does it anything else?).

  9. #9
    Xtreme Mentor
    Join Date
    May 2007
    Posts
    2,792
    Very nice. Then that's why Sammi was using it.

    Nope, that's it's main purpose. TLB caching.

  10. #10
    Xtreme Mentor
    Join Date
    Nov 2005
    Location
    Devon
    Posts
    3,437
    Can anyone try WinRAR benchmark with TLB disabled?

    I've tried AOD magic button, but still performance of some applications wasn't where it should be...
    Memory latencies was back to normal after disabling Errata 298, but WinRAR was still slow. I mean 290KB/s with Errata enabled and 410KB/s with Errata disabled using AOD. My normal speed is 1480KB/s...
    RiG1: Ryzen 7 1700 @4.0GHz 1.39V, Asus X370 Prime, G.Skill RipJaws 2x8GB 3200MHz CL14 Samsung B-die, TuL Vega 56 Stock, Samsung SS805 100GB SLC SDD (OS Drive) + 512GB Evo 850 SSD (2nd OS Drive) + 3TB Seagate + 1TB Seagate, BeQuiet PowerZone 1000W

    RiG2: HTPC AMD A10-7850K APU, 2x8GB Kingstone HyperX 2400C12, AsRock FM2A88M Extreme4+, 128GB SSD + 640GB Samsung 7200, LG Blu-ray Recorder, Thermaltake BACH, Hiper 4M880 880W PSU

    SmartPhone Samsung Galaxy S7 EDGE
    XBONE paired with 55'' Samsung LED 3D TV

  11. #11
    Registered User
    Join Date
    Dec 2007
    Posts
    90
    Quote Originally Posted by Lightman View Post
    Can anyone try WinRAR benchmark with TLB disabled?

    I've tried AOD magic button, but still performance of some applications wasn't where it should be...
    Memory latencies was back to normal after disabling Errata 298, but WinRAR was still slow. I mean 290KB/s with Errata enabled and 410KB/s with Errata disabled using AOD. My normal speed is 1480KB/s...
    Lightman, I cant help but to think that your disk cache/speed will affect that also?
    System Specs:

    System 1: Asus P5E,Q6600 @ 3.6Ghz, 4GB OCZ Plat DDR2-1066, Tri-Raid 0 1TB 16MB cache, Radeon HD4870.

    System 2: (wip) Asus M3A78T, Phenom II 720 BE @ 3.8Ghz, 2GB OCZ plat 1066 DDR2, Radeon 2900XT 1GB.

  12. #12
    Xtreme Mentor
    Join Date
    Nov 2005
    Location
    Devon
    Posts
    3,437
    Quote Originally Posted by dehx View Post
    Lightman, I cant help but to think that your disk cache/speed will affect that also?
    Not really. WinRAR internal benchmark is operating only within RAM memory excluding HDD I/O....

    For me, AOD was disabling only part of Errata code thus in some circumstances performance was still affected.
    I'm disabling it from BIOS anyhow, but would like to know if other people are experiencing same issue... If that's the case then only real alternative for disabling this sick errata is via the BIOS...
    RiG1: Ryzen 7 1700 @4.0GHz 1.39V, Asus X370 Prime, G.Skill RipJaws 2x8GB 3200MHz CL14 Samsung B-die, TuL Vega 56 Stock, Samsung SS805 100GB SLC SDD (OS Drive) + 512GB Evo 850 SSD (2nd OS Drive) + 3TB Seagate + 1TB Seagate, BeQuiet PowerZone 1000W

    RiG2: HTPC AMD A10-7850K APU, 2x8GB Kingstone HyperX 2400C12, AsRock FM2A88M Extreme4+, 128GB SSD + 640GB Samsung 7200, LG Blu-ray Recorder, Thermaltake BACH, Hiper 4M880 880W PSU

    SmartPhone Samsung Galaxy S7 EDGE
    XBONE paired with 55'' Samsung LED 3D TV

  13. #13
    Xtreme Mentor
    Join Date
    May 2007
    Posts
    2,792
    Which WinRAR version gets 1408KB/s Lightman? Was that a typo by any chance? That seems very low for the multi threaded on XP32b/64b.

  14. #14
    Xtreme X.I.P.
    Join Date
    Nov 2002
    Location
    Shipai
    Posts
    31,147
    very nice, sticky!

  15. #15
    Xtreme Member
    Join Date
    Oct 2006
    Posts
    115
    msi k9a2 platinum. bios 1.22
    AOD red/yellow/green doesn't matter. CrystalCPU reads that value as 10.

    Winrar benchmark doesn't appear to change whether I change AOD either. I get about 431KB/s in the benchmark.
    Phenom 9500 @ 2366MHZ
    2 x 2GB Geil PC2-8500 DDR2
    2 x Sapphire 3870
    MSI K9A2 Platinum
    2 x WD Raptor 150GB
    LG FP246 24" WS LCD @ 1920x1200
    2 x Hitach 1TB Sata
    1 x LG 18x DVD-RW
    Vista SP1 / RC1

  16. #16
    Xtreme Addict
    Join Date
    Sep 2007
    Location
    Munich, DE
    Posts
    1,401
    Quote Originally Posted by blargman View Post
    msi k9a2 platinum. bios 1.22
    AOD red/yellow/green doesn't matter. CrystalCPU reads that value as 10.

    Winrar benchmark doesn't appear to change whether I change AOD either. I get about 431KB/s in the benchmark.
    Similar with M3A here (301 bios no fix). CrystalCPU reads 10h and 18h but everest bandwidth keeps the same.
    It only works with CrystalCPU or AOD if the fix was applied via the bios.

  17. #17
    Banned
    Join Date
    Dec 2007
    Location
    Most likely inside my PC :)
    Posts
    41
    It's possible to see TLB errata fix performance hit in realtime.

    Open Winrar, hit alt-b and whilst benchmark is running, cycle through AOD yellow/red/no-colour settings, and you'll see the effect in winrar.

    No-colour setting nets me approx 950kb/s.

    Yellow nets me approx 1250kb/s.

    Red nets me approx 1412kb/s.

    This is with a few everyday apps running in background, and at stock.

    I'll do a 2800Mhz run soon and post results to compare with.
    Last edited by MR.Q; 12-28-2007 at 05:08 PM.

  18. #18
    Xtreme Member
    Join Date
    Oct 2006
    Posts
    115
    what kinda setup you got? max i get is around 400KB/s heh
    I do notice a big jump going from green to yellow, and a small one from yellow to red.
    Phenom 9500 @ 2366MHZ
    2 x 2GB Geil PC2-8500 DDR2
    2 x Sapphire 3870
    MSI K9A2 Platinum
    2 x WD Raptor 150GB
    LG FP246 24" WS LCD @ 1920x1200
    2 x Hitach 1TB Sata
    1 x LG 18x DVD-RW
    Vista SP1 / RC1

  19. #19
    Xtreme Mentor
    Join Date
    May 2007
    Posts
    2,792
    Wait a minute. You guys are saying WinRAR multithreaded you're getting 410/900/1500 KB/s tops?

    Mr.Q: Try a 2.8/2.7GHz run please (using and not using AOD button). Those values are very low compared to what I recall.

  20. #20
    Xtreme Mentor
    Join Date
    Nov 2005
    Location
    Devon
    Posts
    3,437
    Quote Originally Posted by KTE View Post
    Wait a minute. You guys are saying WinRAR multithreaded you're getting 410/900/1500 KB/s tops?

    Mr.Q: Try a 2.8/2.7GHz run please (using and not using AOD button). Those values are very low compared to what I recall.
    2.5GHz - 1430KB/s
    Windows XP x64, WinRAR 3.71, all cores utilized 100%...
    I was wondering how you were getting that high scores and it might be MSI or simply X64 Windows.... I will give it a go under MCE later
    RiG1: Ryzen 7 1700 @4.0GHz 1.39V, Asus X370 Prime, G.Skill RipJaws 2x8GB 3200MHz CL14 Samsung B-die, TuL Vega 56 Stock, Samsung SS805 100GB SLC SDD (OS Drive) + 512GB Evo 850 SSD (2nd OS Drive) + 3TB Seagate + 1TB Seagate, BeQuiet PowerZone 1000W

    RiG2: HTPC AMD A10-7850K APU, 2x8GB Kingstone HyperX 2400C12, AsRock FM2A88M Extreme4+, 128GB SSD + 640GB Samsung 7200, LG Blu-ray Recorder, Thermaltake BACH, Hiper 4M880 880W PSU

    SmartPhone Samsung Galaxy S7 EDGE
    XBONE paired with 55'' Samsung LED 3D TV

  21. #21
    Xtreme Member
    Join Date
    Oct 2006
    Posts
    115
    could be partly my problem. cores 2,3,4 hang at about 80&#37; usage. core1 about 30% :\ never uses 100% of each.
    heh, i get about the same score unchecking multhreading
    Phenom 9500 @ 2366MHZ
    2 x 2GB Geil PC2-8500 DDR2
    2 x Sapphire 3870
    MSI K9A2 Platinum
    2 x WD Raptor 150GB
    LG FP246 24" WS LCD @ 1920x1200
    2 x Hitach 1TB Sata
    1 x LG 18x DVD-RW
    Vista SP1 / RC1

  22. #22
    Xtreme Mentor
    Join Date
    May 2007
    Posts
    2,792
    Yeah your WinRAR scores are very low maybe your BIOSes are bad. Try another BIOS. This board has better perf in mem/latency than Gigabyte boards, but not that much at all and some of these guys have got MSI boards so its something else. Somethings wrong. I have the same version 3.71 XP 32-bit. I get 2143KB/s with 9500 @ 2.53GHz:



    2420MHz is ~2045KB/s multi and ~700KB/s single.

    P4 3.6GHz gets 466KB/s single:


  23. #23
    Xtreme Member
    Join Date
    Jun 2003
    Location
    Australia :p
    Posts
    104
    I'm getting similar scores to KTE, ~2038kb/s with my Phenom 9500 @ 2.47 on XP 32bit.
    Can't be the Gigabyte boards, all the 790X-790FX boards share the same bios.
    Phenom 9850 | Gigabyte 790FX-DS5 | 2GB RAM | Gecube 3870+3850

  24. #24
    Xtreme Mentor
    Join Date
    May 2007
    Posts
    2,792
    Quote Originally Posted by Schneider View Post
    Can't be the Gigabyte boards, all the 790X-790FX boards share the same bios.
    There's an anomaly -- It's not just the Gigabyte boards here it's the MSI ones too. But their BIOS versions are different to one I'm using. Also there is quite a bit of performance difference between the boards at stock anyway. But no way this much and there isn't supposed to be any difference in the WinRAR benches from what I've seen before.

  25. #25
    Xtreme Mentor
    Join Date
    Nov 2005
    Location
    Devon
    Posts
    3,437
    Tested under XP MCE and got 2048KB/s @2.5GHz (same settings as yours KTE).

    This is OS related then
    RiG1: Ryzen 7 1700 @4.0GHz 1.39V, Asus X370 Prime, G.Skill RipJaws 2x8GB 3200MHz CL14 Samsung B-die, TuL Vega 56 Stock, Samsung SS805 100GB SLC SDD (OS Drive) + 512GB Evo 850 SSD (2nd OS Drive) + 3TB Seagate + 1TB Seagate, BeQuiet PowerZone 1000W

    RiG2: HTPC AMD A10-7850K APU, 2x8GB Kingstone HyperX 2400C12, AsRock FM2A88M Extreme4+, 128GB SSD + 640GB Samsung 7200, LG Blu-ray Recorder, Thermaltake BACH, Hiper 4M880 880W PSU

    SmartPhone Samsung Galaxy S7 EDGE
    XBONE paired with 55'' Samsung LED 3D TV

Page 1 of 6 1234 ... LastLast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •