2013/2/27 sandeep kumar
<coolsandyforyou@gmail.com>
>"volatile" only say to the compiler to not put the variable in a register.
>Could i ask why does you want to mesure the speed of the RAM ? Is it to study the NUMA behavior of the machine?
In development phase of the board, we are trying to measure RAM performance gain while changing type of the RAM.
The standard benchmark tools are giving us the Cache performance only. So we want to try some method to measure RAM performance.
ok.
The answear is hardware-dependent, some hardware may have a way to disable the cachability (but will probly need to be in the kernel).
But to skeep the hardware dependencie, you need to read a part of memory that is not cached.
The best way is to do the test at boot time when the caches are cold. I dont think that a user-space application could do this in precise way, since it cannot know the physical address it address....
Doing a small "boot" code and booted directly (without grub) could give some precise numbers.
You will also need to space yout read request (128*8 byte for example), since most cache caches a line while you have read only one word.
Hope i helped.
regards.