Changes in / [9fb1367:95b3a9c]
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/http_ring.cpp
r9fb1367 r95b3a9c 20 20 socklen_t *addrlen; 21 21 int flags; 22 unsigned cnt; 22 23 } acpt; 23 24 … … 433 434 // Accept our first connection 434 435 // 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 } 436 439 437 440 int reset = 1; // Counter to print stats once in a while … … 528 531 unsigned entries = 256; // number of entries per ring/kernel thread 529 532 unsigned backlog = 262144; // backlog argument to listen 533 unsigned preaccept = 1; // start by accepting X per threads 530 534 bool attach = false; // Whether or not to attach all the rings 531 535 bool sqpoll = false; // Whether or not to use SQ Polling … … 534 538 // Arguments Parsing 535 539 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) { 537 541 switch (c) 538 542 { … … 548 552 case 'b': 549 553 backlog = atoi(optarg); 554 break; 555 case 'c': 556 preaccept = atoi(optarg); 550 557 break; 551 558 case 'a': … … 681 688 thrd_opts[i].acpt.addrlen = (socklen_t*)&addrlen; 682 689 thrd_opts[i].acpt.flags = 0; 690 thrd_opts[i].acpt.cnt = preaccept; 683 691 thrd_opts[i].endfd = efd; 684 692 thrd_opts[i].ring = &thrd_rings[i].storage; -
libcfa/configure.ac
r9fb1367 r95b3a9c 169 169 AH_TEMPLATE([CFA_HAVE_IOSQE_FIXED_FILE],[Defined if io_uring support is present when compiling libcfathread and supports the flag FIXED_FILE.]) 170 170 AH_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.])172 171 AH_TEMPLATE([CFA_HAVE_IOSQE_IO_LINK],[Defined if io_uring support is present when compiling libcfathread and supports the flag IO_LINK.]) 173 172 AH_TEMPLATE([CFA_HAVE_IOSQE_IO_HARDLINK],[Defined if io_uring support is present when compiling libcfathread and supports the flag IO_HARDLINK.]) 173 AH_TEMPLATE([CFA_HAVE_IOSQE_ASYNC],[Defined if io_uring support is present when compiling libcfathread and supports the flag ASYNC.]) 174 AH_TEMPLATE([CFA_HAVE_IOSQE_BUFFER_SELECT],[Defined if io_uring support is present when compiling libcfathread and supports the flag BUFFER_SELEC.]) 174 175 AH_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.]) 175 176 AH_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.]) … … 182 183 183 184 define(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])185 define(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]) 185 186 186 187 define(ioring_from_decls, [ -
libcfa/prelude/defines.hfa.in
r9fb1367 r95b3a9c 149 149 150 150 /* 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 151 155 supports the flag FIXED_FILE. */ 152 156 #undef CFA_HAVE_IOSQE_FIXED_FILE
Note: See TracChangeset
for help on using the changeset viewer.