Changeset 0335620
- Timestamp:
- May 7, 2020, 5:12:47 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- dd4e2d7
- Parents:
- 5dadc9b
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/readv.cfa
r5dadc9b r0335620 64 64 for(;;) { 65 65 static struct option options[] = { 66 {"duration", required_argument, 0, 'd'}, 67 {"nthreads", required_argument, 0, 't'}, 68 {"nprocs", required_argument, 0, 'p'}, 69 {"bufsize", required_argument, 0, 'b'}, 70 {"userthread", no_argument , 0, 'u'}, 66 {"duration", required_argument, 0, 'd'}, 67 {"nthreads", required_argument, 0, 't'}, 68 {"nprocs", required_argument, 0, 'p'}, 69 {"bufsize", required_argument, 0, 'b'}, 70 {"userthread", no_argument , 0, 'u'}, 71 {"submitthread", no_argument , 0, 's'}, 71 72 {0, 0, 0, 0} 72 73 }; 73 74 74 75 int idx = 0; 75 int opt = getopt_long(argc, argv, "d:t:p:b:u ", options, &idx);76 int opt = getopt_long(argc, argv, "d:t:p:b:us", options, &idx); 76 77 77 78 const char * arg = optarg ? optarg : ""; … … 113 114 flags |= CFA_CLUSTER_IO_POLLER_USER_THREAD; 114 115 break; 116 case 's': 117 flags |= CFA_CLUSTER_IO_POLLER_THREAD_SUBMITS; 118 break; 115 119 // Other cases 116 120 default: /* ? */ … … 123 127 fprintf(stderr, " -p, --nprocs=NPROCS Number of kernel threads\n"); 124 128 fprintf(stderr, " -b, --buflen=SIZE Number of bytes to read per request\n"); 129 fprintf(stderr, " -u, --userthread If set, cluster uses user-thread to poll I/O\n"); 130 fprintf(stderr, " -s, --submitthread If set, cluster uses polling thread to submit I/O\n"); 125 131 exit(EXIT_FAILURE); 126 132 } -
libcfa/src/concurrency/io.cfa
r5dadc9b r0335620 280 280 281 281 if( io_flags & CFA_CLUSTER_IO_POLLER_THREAD_SUBMITS ) { 282 sq.ready_cnt = 10;283 sq.ready = alloc (sq.ready_cnt );282 sq.ready_cnt = 32; 283 sq.ready = alloc_align( 64, sq.ready_cnt ); 284 284 for(i; sq.ready_cnt) { 285 285 sq.ready[i] = -1ul32; … … 584 584 int count; 585 585 bool again; 586 [count, again] = __drain_io( ring, &mask, 1, true );586 [count, again] = __drain_io( ring, &mask, 0, true ); 587 587 588 588 // Update statistics … … 665 665 } 666 666 667 static inline void __wake_poller( struct __io_data & ring ) __attribute__((artificial)); 667 668 static inline void __wake_poller( struct __io_data & ring ) { 668 sigval val = { 1 };669 pthread_sigqueue( ring.poller.slow.kthrd, SIGUSR1, val );669 // sigval val = { 1 }; 670 // pthread_sigqueue( ring.poller.slow.kthrd, SIGUSR1, val ); 670 671 } 671 672
Note: See TracChangeset
for help on using the changeset viewer.