Changeset 2223c80 for benchmark


Ignore:
Timestamp:
May 13, 2020, 6:34:09 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
365cb03f, 9c438546
Parents:
856fe3e (diff), 979df46 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/readv.cfa

    r856fe3e r2223c80  
    5959        unsigned long int nthreads = 2;
    6060        unsigned long int nprocs   = 1;
    61         int flags = 0;
     61        unsigned flags = 0;
     62        unsigned sublen = 16;
    6263
    6364        arg_loop:
    6465        for(;;) {
    6566                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'},
    7174                        {0, 0, 0, 0}
    7275                };
    7376
    7477                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);
    7679
    7780                const char * arg = optarg ? optarg : "";
     
    113116                                flags |= CFA_CLUSTER_IO_POLLER_USER_THREAD;
    114117                                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;
    115129                        // Other cases
    116130                        default: /* ? */
     
    123137                                fprintf(stderr, "  -p, --nprocs=NPROCS      Number of kernel threads\n");
    124138                                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");
    125141                                exit(EXIT_FAILURE);
    126142                }
Note: See TracChangeset for help on using the changeset viewer.