Changes in / [eb24cec0:e7c077a]


Ignore:
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/http_ring.cpp

    reb24cec0 re7c077a  
    2020                socklen_t *addrlen;
    2121                int flags;
     22                unsigned cnt;
    2223        } acpt;
    2324
     
    433434        // Accept our first connection
    434435        // May not take effect until io_uring_submit_and_wait
    435         connection::accept(ring, opt);
     436        for(unsigned i = 0; i < opt.acpt.cnt; i++) {
     437                connection::accept(ring, opt);
     438        }
    436439
    437440        int reset = 1;       // Counter to print stats once in a while
     
    528531        unsigned entries = 256;     // number of entries per ring/kernel thread
    529532        unsigned backlog = 262144;  // backlog argument to listen
     533        unsigned preaccept = 1;     // start by accepting X per threads
    530534        bool attach = false;        // Whether or not to attach all the rings
    531535        bool sqpoll = false;        // Whether or not to use SQ Polling
     
    534538        // Arguments Parsing
    535539        int c;
    536         while ((c = getopt (argc, argv, "t:p:e:b:aS")) != -1) {
     540        while ((c = getopt (argc, argv, "t:p:e:b:c:aS")) != -1) {
    537541                switch (c)
    538542                {
     
    548552                case 'b':
    549553                        backlog = atoi(optarg);
     554                        break;
     555                case 'c':
     556                        preaccept = atoi(optarg);
    550557                        break;
    551558                case 'a':
     
    681688                thrd_opts[i].acpt.addrlen = (socklen_t*)&addrlen;
    682689                thrd_opts[i].acpt.flags   = 0;
     690                thrd_opts[i].acpt.cnt     = preaccept;
    683691                thrd_opts[i].endfd        = efd;
    684692                thrd_opts[i].ring         = &thrd_rings[i].storage;
  • libcfa/configure.ac

    reb24cec0 re7c077a  
    169169AH_TEMPLATE([CFA_HAVE_IOSQE_FIXED_FILE],[Defined if io_uring support is present when compiling libcfathread and supports the flag FIXED_FILE.])
    170170AH_TEMPLATE([CFA_HAVE_IOSQE_IO_DRAIN],[Defined if io_uring support is present when compiling libcfathread and supports the flag IO_DRAIN.])
    171 AH_TEMPLATE([CFA_HAVE_IOSQE_ASYNC],[Defined if io_uring support is present when compiling libcfathread and supports the flag ASYNC.])
    172171AH_TEMPLATE([CFA_HAVE_IOSQE_IO_LINK],[Defined if io_uring support is present when compiling libcfathread and supports the flag IO_LINK.])
    173172AH_TEMPLATE([CFA_HAVE_IOSQE_IO_HARDLINK],[Defined if io_uring support is present when compiling libcfathread and supports the flag IO_HARDLINK.])
     173AH_TEMPLATE([CFA_HAVE_IOSQE_ASYNC],[Defined if io_uring support is present when compiling libcfathread and supports the flag ASYNC.])
     174AH_TEMPLATE([CFA_HAVE_IOSQE_BUFFER_SELECT],[Defined if io_uring support is present when compiling libcfathread and supports the flag BUFFER_SELEC.])
    174175AH_TEMPLATE([CFA_HAVE_SPLICE_F_FD_IN_FIXED],[Defined if io_uring support is present when compiling libcfathread and supports the flag SPLICE_F_FD_IN_FIXED.])
    175176AH_TEMPLATE([CFA_HAVE_IORING_SETUP_ATTACH_WQ],[Defined if io_uring support is present when compiling libcfathread and supports the flag IORING_SETUP_ATTACH_WQ.])
     
    182183
    183184define(ioring_ops, [IORING_OP_NOP,IORING_OP_READV,IORING_OP_WRITEV,IORING_OP_FSYNC,IORING_OP_READ_FIXED,IORING_OP_WRITE_FIXED,IORING_OP_POLL_ADD,IORING_OP_POLL_REMOVE,IORING_OP_SYNC_FILE_RANGE,IORING_OP_SENDMSG,IORING_OP_RECVMSG,IORING_OP_TIMEOUT,IORING_OP_TIMEOUT_REMOVE,IORING_OP_ACCEPT,IORING_OP_ASYNC_CANCEL,IORING_OP_LINK_TIMEOUT,IORING_OP_CONNECT,IORING_OP_FALLOCATE,IORING_OP_OPENAT,IORING_OP_CLOSE,IORING_OP_FILES_UPDATE,IORING_OP_STATX,IORING_OP_READ,IORING_OP_WRITE,IORING_OP_FADVISE,IORING_OP_MADVISE,IORING_OP_SEND,IORING_OP_RECV,IORING_OP_OPENAT2,IORING_OP_EPOLL_CTL,IORING_OP_SPLICE,IORING_OP_PROVIDE_BUFFERS,IORING_OP_REMOVE_BUFFER,IORING_OP_TEE])
    184 define(ioring_flags, [IOSQE_FIXED_FILE,IOSQE_IO_DRAIN,IOSQE_ASYNC,IOSQE_IO_LINK,IOSQE_IO_HARDLINK,SPLICE_F_FD_IN_FIXED,IORING_SETUP_ATTACH_WQ])
     185define(ioring_flags, [IOSQE_FIXED_FILE,IOSQE_IO_DRAIN,IOSQE_IO_LINK,IOSQE_IO_HARDLINK,IOSQE_ASYNC,IOSQE_BUFFER_SELECT,SPLICE_F_FD_IN_FIXED,IORING_SETUP_ATTACH_WQ])
    185186
    186187define(ioring_from_decls, [
  • libcfa/prelude/defines.hfa.in

    reb24cec0 re7c077a  
    149149
    150150/* Defined if io_uring support is present when compiling libcfathread and
     151   supports the flag BUFFER_SELEC. */
     152#undef CFA_HAVE_IOSQE_BUFFER_SELECT
     153
     154/* Defined if io_uring support is present when compiling libcfathread and
    151155   supports the flag FIXED_FILE. */
    152156#undef CFA_HAVE_IOSQE_FIXED_FILE
Note: See TracChangeset for help on using the changeset viewer.