Changeset 2802824 for benchmark/io/readv.cfa
- Timestamp:
- May 21, 2020, 5:12:02 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:
- 0e4df2e
- Parents:
- 33e62f1b (diff), 2f1cb37 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/readv.cfa
r33e62f1b r2802824 59 59 unsigned long int nthreads = 2; 60 60 unsigned long int nprocs = 1; 61 int flags = 0; 61 unsigned flags = 0; 62 unsigned sublen = 16; 62 63 63 64 arg_loop: 64 65 for(;;) { 65 66 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'}, 67 {"duration", required_argument, 0, 'd'}, 68 {"nthreads", required_argument, 0, 't'}, 69 {"nprocs", required_argument, 0, 'p'}, 70 {"bufsize", required_argument, 0, 'b'}, 71 {"userthread", no_argument , 0, 'u'}, 72 {"submitthread", no_argument , 0, 's'}, 73 {"submitlength", required_argument, 0, 'l'}, 71 74 {0, 0, 0, 0} 72 75 }; 73 76 74 77 int idx = 0; 75 int opt = getopt_long(argc, argv, "d:t:p:b:u ", options, &idx);78 int opt = getopt_long(argc, argv, "d:t:p:b:usl:", options, &idx); 76 79 77 80 const char * arg = optarg ? optarg : ""; … … 113 116 flags |= CFA_CLUSTER_IO_POLLER_USER_THREAD; 114 117 break; 118 case 's': 119 flags |= CFA_CLUSTER_IO_POLLER_THREAD_SUBMITS; 120 break; 121 case 'l': 122 sublen = strtoul(arg, &end, 10); 123 if(*end != '\0' && sublen < 16) { 124 fprintf(stderr, "Submit length must be at least 16, was %s\n", arg); 125 goto usage; 126 } 127 flags |= (sublen << CFA_CLUSTER_IO_BUFFLEN_OFFSET); 128 break; 115 129 // Other cases 116 130 default: /* ? */ … … 123 137 fprintf(stderr, " -p, --nprocs=NPROCS Number of kernel threads\n"); 124 138 fprintf(stderr, " -b, --buflen=SIZE Number of bytes to read per request\n"); 139 fprintf(stderr, " -u, --userthread If set, cluster uses user-thread to poll I/O\n"); 140 fprintf(stderr, " -s, --submitthread If set, cluster uses polling thread to submit I/O\n"); 125 141 exit(EXIT_FAILURE); 126 142 }
Note: See TracChangeset
for help on using the changeset viewer.