Changeset a3769cc for benchmark/readyQ
- Timestamp:
 - Sep 14, 2021, 10:21:11 PM (4 years ago)
 - Branches:
 - ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
 - Children:
 - b8454c6
 - Parents:
 - 347925c (diff), ebb6158 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
 - benchmark/readyQ
 - Files:
 - 
      
- 1 added
 - 5 edited
 
- 
          
  cycle.cpp (modified) (3 diffs)
 - 
          
  cycle.rs (modified) (1 diff)
 - 
          
  locality.rs (modified) (2 diffs)
 - 
          
  transfer.cfa (modified) (2 diffs)
 - 
          
  transfer.rs (added)
 - 
          
  yield.rs (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
benchmark/readyQ/cycle.cpp
r347925c ra3769cc 41 41 Fibre * threads[tthreads]; 42 42 Partner thddata[tthreads]; 43 for( inti = 0; i < tthreads; i++) {43 for(unsigned i = 0; i < tthreads; i++) { 44 44 unsigned pi = (i + nthreads) % tthreads; 45 45 thddata[i].next = &thddata[pi].self; 46 46 } 47 for( inti = 0; i < tthreads; i++) {47 for(unsigned i = 0; i < tthreads; i++) { 48 48 threads[i] = new Fibre( reinterpret_cast<void (*)(void *)>(partner_main), &thddata[i] ); 49 49 } … … 53 53 start = timeHiRes(); 54 54 55 for( inti = 0; i < nthreads; i++) {55 for(unsigned i = 0; i < nthreads; i++) { 56 56 thddata[i].self.post(); 57 57 } … … 62 62 printf("\nDone\n"); 63 63 64 for( inti = 0; i < tthreads; i++) {64 for(unsigned i = 0; i < tthreads; i++) { 65 65 thddata[i].self.post(); 66 66 fibre_join( threads[i], nullptr );  - 
      
benchmark/readyQ/cycle.rs
r347925c ra3769cc 46 46 47 47 let tthreads = nthreads * ring_size; 48 let exp = Arc::new(bench::BenchData::new(options, tthreads ));48 let exp = Arc::new(bench::BenchData::new(options, tthreads, None)); 49 49 50 50 let s = (1000000 as u64).to_formatted_string(&Locale::en);  - 
      
benchmark/readyQ/locality.rs
r347925c ra3769cc 124 124 return (r as *mut MyData, true); 125 125 } 126 let got = self.ptr.compare_ and_swap(expected, ctx as *mut MyCtx as u64, Ordering::SeqCst);127 if got == expected{126 let got = self.ptr.compare_exchange_weak(expected, ctx as *mut MyCtx as u64, Ordering::SeqCst, Ordering::SeqCst); 127 if got == Ok(expected) { 128 128 break expected;// We got the seat 129 129 } … … 285 285 assert_eq!(&s, "1,000,000"); 286 286 287 let exp = Arc::new(bench::BenchData::new(options, nprocs ));287 let exp = Arc::new(bench::BenchData::new(options, nprocs, None)); 288 288 let mut results = Result::new(); 289 289  - 
      
benchmark/readyQ/transfer.cfa
r347925c ra3769cc 39 39 Pause(); 40 40 if( (timeHiRes() - start) > 5`s ) { 41 print_stats_now( bench_cluster, CFA_STATS_READY_Q | CFA_STATS_IO ); 41 42 serr | "Programs has been blocked for more than 5 secs"; 42 43 exit(1); … … 110 111 cfa_option opt[] = { 111 112 BENCH_OPT, 112 { 'e', "exhaust", "Whether or not threads that have seen the new epoch should yield or park.", exhaust, parse_yesno}113 { 'e', "exhaust", "Whether or not threads that have seen the new epoch should park instead of yielding.", exhaust, parse_yesno} 113 114 }; 114 115 BENCH_OPT_PARSE("cforall transition benchmark");  - 
      
benchmark/readyQ/yield.rs
r347925c ra3769cc 44 44 let nprocs = options.value_of("nprocs").unwrap().parse::<usize>().unwrap(); 45 45 46 let exp = Arc::new(bench::BenchData::new(options, nthreads ));46 let exp = Arc::new(bench::BenchData::new(options, nthreads, None)); 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| { 53 let pi = (i + nthreads) % nthreads; 52 (0..nthreads).map(|_i| { 54 53 Arc::new(Yielder{ 55 54 sem: sync::Semaphore::new(0),  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.