title: disable caching via /proc/mtrr
body: <p>When I'm issuing this command</p>
  
  <pre><code>sudo sh -c "echo \"base=0x110000 size=0xa000 type=uncachable\" &gt;| /proc/mtrr"
  </code></pre>
  
  <p>/proc/mtrr is not changed, while I would expect it to add a new entry.</p>
  
  <p>It works with this command:</p>
  
  <pre><code>sudo sh -c "echo \"base=0x110000 size=0x10000 type=uncachable\" &gt;| /proc/mtrr"
  </code></pre>
  
  <p>It adds this entry:</p>
  
  <pre><code>reg05: base=0x000110000 (    1MB), size=   64KB, count=1: uncachable
  </code></pre>
  
  <p>So I assume that the size parameter is restricted in some ways. Are there such restrictions? Is it possible to set arbitrary memory regions to 'uncachable'?</p>
  
  <p>My original (after bootup) /proc/mtrr looks like this:</p>
  
  <pre><code>reg00: base=0x000000000 (    0MB), size= 1024MB, count=1: write-back
  reg01: base=0x040000000 ( 1024MB), size=  512MB, count=1: write-back
  reg02: base=0x05f700000 ( 1527MB), size=    1MB, count=1: uncachable
  reg03: base=0x05f800000 ( 1528MB), size=    8MB, count=1: uncachable
  reg04: base=0x0c0000000 ( 3072MB), size=  256MB, count=1: write-combining
  </code></pre>
  
  <p>I'm using Linux 2.6.32-41-generic #89-Ubuntu SMP on a Pentium M. Reference:
  <a href="http://www.mjmwired.net/kernel/Documentation/mtrr.txt" rel="nofollow">http://www.mjmwired.net/kernel/Documentation/mtrr.txt</a></p>
  
  <p>Background: For a timing experiment I want to disable cpu caches for the memory regions of a certain process.</p>