Add small utility used to trigger l3 accesses (conjoint use the a uncore cbo measuring utility allow cbo slice reverse)

This commit is contained in:
guillaume didier 2020-04-06 11:13:12 +02:00
parent b7b6c8e9cc
commit 158b808d92
3 changed files with 14 additions and 0 deletions

13
cache_utils/src/bin/l3.rs Normal file
View File

@ -0,0 +1,13 @@
use cache_utils::flush;
use cache_utils::mmap::MMappedMemory;
pub fn main() {
let m = unsafe { MMappedMemory::new(2 << 20) };
let array = m.slice();
loop {
unsafe {
flush(&array[0]);
flush(&array[(1 << 8) ^ (1 << 12) ^ (1 << 10)]);
}
}
}

View File

View File

@ -57,6 +57,7 @@ pub fn main() {
};*/
let m = unsafe { MMappedMemory::new(SIZE) };
let array = m.slice();
/*
let p = Box::new(Page { mem: [0; 4096] });