Add warm-up, calibrate more core pairs, to supersed original calibration
This commit is contained in:
parent
77a40a24be
commit
cbe2367019
@ -98,7 +98,12 @@ fn main() {
|
||||
println!("{},{}", 0, i);
|
||||
}
|
||||
i = i << 1;
|
||||
|
||||
}
|
||||
for i in 1..CpuSet::count() {
|
||||
if old.is_set(i).unwrap() {
|
||||
core_pairs.push((i, 0));
|
||||
println!("{},{}", i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// operations
|
||||
|
@ -560,11 +560,12 @@ fn calibrate_fixed_freq_2_thread_impl<I: Iterator<Item = (usize, usize)>>(
|
||||
for (main_core, helper_core) in cores {
|
||||
// set main thread affinity
|
||||
|
||||
|
||||
if verbosity_level >= Thresholds {
|
||||
println!("Calibration for main_core {}, helper {}.", main_core, helper_core);
|
||||
}
|
||||
|
||||
eprintln!("Calibration for main_core {}, helper {}.", main_core, helper_core);
|
||||
|
||||
let mut core = CpuSet::new();
|
||||
match core.set(main_core) {
|
||||
Ok(_) => {},
|
||||
@ -627,6 +628,11 @@ fn calibrate_fixed_freq_2_thread_impl<I: Iterator<Item = (usize, usize)>>(
|
||||
for op in operations {
|
||||
helper_thread_params.op.store(op.prepare, Ordering::Relaxed);
|
||||
let mut hist = vec![0; hist_params.bucket_number];
|
||||
for _ in 0..hist_params.iterations {
|
||||
next(&helper_thread_params.turn);
|
||||
wait(&helper_thread_params.turn, false);
|
||||
let _time = unsafe { (op.op)(pointer) };
|
||||
}
|
||||
for _ in 0..hist_params.iterations {
|
||||
next(&helper_thread_params.turn);
|
||||
wait(&helper_thread_params.turn, false);
|
||||
|
Loading…
Reference in New Issue
Block a user