# Disable cache through /proc/mtrr

**URL:** <https://forums.suse.com/t/disable-cache-through-proc-mtrr/24899>\
**Category:** SLES Hardware\
**Created:** [December 18, 2013, 5:37pm UTC](https://forums.suse.com/t/disable-cache-through-proc-mtrr/24899 "2013-12-18T17:37:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![naruto\_uzu](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@naruto\_uzu](https://forums.suse.com/u/naruto_uzu)\
**Post date:** [December 18, 2013, 5:37pm UTC](https://forums.suse.com/t/disable-cache-through-proc-mtrr/24899/1 "2013-12-18T17:37:37Z")

</div>

Hi,

I tried to disable caching by adding an uncachable region in /proc/mtrr but iit cannot work. I have to readd the whole region again, it works, for ex:

My add:

reg00: base=0x000000000 ( 0MB), size= 16384MB, count=1: write-back  
reg01: base=0x400000000 (16384MB), size= 8192MB, count=1: write-back  
reg03: base=0x020000000 ( 8192MB), size= 512MB, count=1: uncachable

The region from 0x020000000 is set as uncachable but it does not work as uncachable.

I have to disable reg00 and then add again the region base from 0x000000000 as uncachable region:

reg00: base=0x000000000 ( 0MB), size= 16384MB, count=1: uncachable  
reg01: base=0x400000000 (16384MB), size= 8192MB, count=1: write-back

Now it can work. I do not know why we add a sub uncachable region in the write-back region as in the first case but it does not work.

As I know on arm architecture, Linux supports a configuration CONFIG\_CPU\_DCACHE\_DISABLE to support cache disable but I do not find the same on x86.

Would you please let me know the reason in the first case and any other option that can disable cache in x86?

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [December 19, 2013, 3:29pm UTC](https://forums.suse.com/t/disable-cache-through-proc-mtrr/24899/2 "2013-12-19T15:29:10Z")

</div>

Hi naruto\_uzu,

that is a pretty kernel-specific, in-depth question that might get a better response if asked on the LKML (Linux kernel mailing list) and for sure needs you to include the version of the kernel you’re working with.

Regards,  
Jens
