Changes in / [b5ec090:63b3279e]
- Files:
-
- 1 deleted
- 7 edited
-
benchmark/Cargo.toml.in (modified) (1 diff)
-
benchmark/Makefile.am (modified) (1 diff)
-
benchmark/bench.rs (modified) (4 diffs)
-
benchmark/readyQ/cycle.rs (modified) (1 diff)
-
benchmark/readyQ/locality.rs (modified) (1 diff)
-
benchmark/readyQ/transfer.rs (deleted)
-
benchmark/readyQ/yield.rs (modified) (2 diffs)
-
libcfa/src/concurrency/kernel.cfa (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/Cargo.toml.in
rb5ec090 r63b3279e 12 12 name = "rdq-locality-tokio" 13 13 path = "@abs_srcdir@/readyQ/locality.rs" 14 15 [[bin]]16 name = "rdq-transfer-tokio"17 path = "@abs_srcdir@/readyQ/transfer.rs"18 14 19 15 [[bin]] -
benchmark/Makefile.am
rb5ec090 r63b3279e 600 600 rdq-locality-go \ 601 601 rdq-locality-fibre \ 602 rdq-transfer-cfa \ 603 rdq-transfer-tokio 602 rdq-transfer-cfa 604 603 605 604 rdq-benches: -
benchmark/bench.rs
rb5ec090 r63b3279e 1 1 use std::io::{self, Write}; 2 use std::option;3 2 use std::sync::atomic::{AtomicU64, AtomicBool, Ordering}; 4 3 use std::time::{Instant,Duration}; 5 use std::u128;6 4 7 5 use clap::{Arg, ArgMatches}; … … 29 27 30 28 impl BenchData { 31 pub fn new(options: ArgMatches, nthreads: usize , default_it: option::Option<u64>) -> BenchData {29 pub fn new(options: ArgMatches, nthreads: usize) -> BenchData { 32 30 let (clock_mode, stop_count, duration) = if options.is_present("iterations") { 33 31 (false, 34 32 options.value_of("iterations").unwrap().parse::<u64>().unwrap(), 35 -1.0)36 } else if !default_it.is_none() {37 (false,38 default_it.unwrap(),39 33 -1.0) 40 34 } else { … … 54 48 } 55 49 56 #[allow(dead_code)]57 50 pub async fn wait(&self, start: &Instant) -> Duration{ 58 51 loop { … … 76 69 } 77 70 78 // ==================================================79 pub fn _lehmer64( state: &mut u128 ) -> u64 {80 *state = state.wrapping_mul(0xda942042e4dd58b5);81 return (*state >> 64) as u64;82 } -
benchmark/readyQ/cycle.rs
rb5ec090 r63b3279e 46 46 47 47 let tthreads = nthreads * ring_size; 48 let exp = Arc::new(bench::BenchData::new(options, tthreads , None));48 let exp = Arc::new(bench::BenchData::new(options, tthreads)); 49 49 50 50 let s = (1000000 as u64).to_formatted_string(&Locale::en); -
benchmark/readyQ/locality.rs
rb5ec090 r63b3279e 285 285 assert_eq!(&s, "1,000,000"); 286 286 287 let exp = Arc::new(bench::BenchData::new(options, nprocs , None));287 let exp = Arc::new(bench::BenchData::new(options, nprocs)); 288 288 let mut results = Result::new(); 289 289 -
benchmark/readyQ/yield.rs
rb5ec090 r63b3279e 44 44 let nprocs = options.value_of("nprocs").unwrap().parse::<usize>().unwrap(); 45 45 46 let exp = Arc::new(bench::BenchData::new(options, nthreads , None));46 let exp = Arc::new(bench::BenchData::new(options, nthreads)); 47 47 48 48 let s = (1000000 as u64).to_formatted_string(&Locale::en); … … 50 50 51 51 let thddata : Arc<Vec<Arc<Yielder>>> = Arc::new( 52 (0..nthreads).map(|_i| { 52 (0..nthreads).map(|i| { 53 let pi = (i + nthreads) % nthreads; 53 54 Arc::new(Yielder{ 54 55 sem: sync::Semaphore::new(0), -
libcfa/src/concurrency/kernel.cfa
rb5ec090 r63b3279e 231 231 __cfadbg_print_safe(runtime_core, "Kernel : core %p waiting on eventfd %d\n", this, this->idle); 232 232 233 { 234 eventfd_t val; 235 ssize_t ret = read( this->idle, &val, sizeof(val) ); 236 if(ret < 0) { 237 switch((int)errno) { 238 case EAGAIN: 239 #if EAGAIN != EWOULDBLOCK 240 case EWOULDBLOCK: 241 #endif 242 case EINTR: 243 // No need to do anything special here, just assume it's a legitimate wake-up 244 break; 245 default: 246 abort( "KERNEL : internal error, read failure on idle eventfd, error(%d) %s.", (int)errno, strerror( (int)errno ) ); 247 } 248 } 249 } 233 __disable_interrupts_hard(); 234 eventfd_t val; 235 eventfd_read( this->idle, &val ); 236 __enable_interrupts_hard(); 250 237 251 238 #if !defined(__CFA_NO_STATISTICS__)
Note:
See TracChangeset
for help on using the changeset viewer.