- Timestamp:
- Sep 14, 2021, 12:47:47 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- a3769cc, fdfb0ba
- Parents:
- 72bd9cd
- Location:
- benchmark
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/Makefile.am
r72bd9cd rebb6158 607 607 608 608 clean-rdq-benches: 609 rm -rf $(RDQBENCHES) 610 611 rdq-%-tokio$(EXEEXT): $(srcdir)/readyQ/%.rs $(srcdir)/bench.rs 612 cd $(builddir) && cargo build --release 613 cp $(builddir)/target/release/$(basename $@) $@ 609 rm -rf $(RDQBENCHES) $(builddir)/target go.mod 610 611 rdq-%-tokio$(EXEEXT): $(builddir)/target/release/rdq-%-tokio$(EXEEXT) 612 $(BENCH_V_RUSTC)cp $(builddir)/target/release/$(basename $@) $@ 613 614 $(builddir)/target/release/rdq-%-tokio$(EXEEXT): $(srcdir)/readyQ/%.rs $(srcdir)/bench.rs 615 $(BENCH_V_RUSTC)cd $(builddir) && cargo build --release 614 616 615 617 rdq-%-cfa$(EXEEXT): $(srcdir)/readyQ/%.cfa $(srcdir)/readyQ/rq_bench.hfa … … 618 620 go.mod: 619 621 touch $@ 620 go mod edit -module=rdq bench622 go mod edit -module=rdq.bench 621 623 go get golang.org/x/sync/semaphore 622 624 go get golang.org/x/text/language -
benchmark/readyQ/cycle.cpp
r72bd9cd rebb6158 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/locality.rs
r72bd9cd rebb6158 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 } -
benchmark/readyQ/transfer.cfa
r72bd9cd rebb6158 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/transfer.rs
r72bd9cd rebb6158 4 4 use std::process; 5 5 use std::option; 6 use std::hint; 6 7 use std::sync::Arc; 7 8 use std::sync::atomic::{AtomicUsize, Ordering}; … … 104 105 debug!( "Waiting for :{} ({})", t.id, t.idx.load(Ordering::Relaxed) ); 105 106 while t.idx.load(Ordering::Relaxed) != idx { 106 std::sync::atomic::spin_loop_hint();107 hint::spin_loop(); 107 108 if start.elapsed() > Duration::from_secs(5) { 108 109 eprintln!("Programs has been blocked for more than 5 secs");
Note: See TracChangeset
for help on using the changeset viewer.