Is it possible to disable L1 and/or L2 cache on Ubuntu 14.04 (preferably in a higher level language like Python)? If so, how?
In addition, will disabling the cache differ significantly between different architectures? If so, I'm more interested in an ARM Cortex-A15.
While researching how to disable the cache, I did find out about the "drop_caches" file in /proc/sys/vm/ from the kernel.org documentation
"Writing to this will cause the kernel to drop clean caches, as well as reclaimable slab objects like dentries and inodes. Once dropped, their memory becomes free."
"This file is not a means to control the growth of the various kernel caches (inodes, dentries, pagecache, etc...) These objects are automatically reclaimed by the kernel when memory is needed elsewhere on the system."
This does not seem like what I'm looking for as not only does this not seem like it would disable the cache, I thought that virtual memory resides within the operating system and not on the hardware. My goal is to disable the cache so the desired memory must be sought elsewhere, such as within the RAM.
To clarify, I understand what disabling the cache will do to the system. However, it is a common technique used in space applications to increase reliability for safety-critical applications. Here are some resources that document this phenomenon:
There are even books on the topic: