| /proc/mtrr" / p...">

Disable caching via / proc / mtrr

When I issue this command

sudo sh -c "echo \"base=0x110000 size=0xa000 type=uncachable\" >| /proc/mtrr" 

/ proc / mtrr does not change while I expect it to add a new entry.

It works with this command:

 sudo sh -c "echo \"base=0x110000 size=0x10000 type=uncachable\" >| /proc/mtrr" 

He adds this entry:

 reg05: base=0x000110000 ( 1MB), size= 64KB, count=1: uncachable 

So, I assume that the size parameter is limited in some cases. Are there such restrictions? Is it possible to set arbitrary "uncachable" memory areas?

My original (after boot) / proc / mtrr looks like this:

 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 

I am using Linux 2.6.32-41-generic # 89-Ubuntu SMP on Pentium M. Link: http://www.mjmwired.net/kernel/Documentation/mtrr.txt

Reference Information. For a synchronization experiment, I want to disable processor caches for memory areas of a specific process.

+4
source share

Source: https://habr.com/ru/post/1415416/


All Articles