Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use io_uring to batch handle clients pending writes to reduce SYSCALL count. #13139

Open
wants to merge 6 commits into
base: unstable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ distclean:
-(cd linenoise && $(MAKE) clean) > /dev/null || true
-(cd lua && $(MAKE) clean) > /dev/null || true
-(cd jemalloc && [ -f Makefile ] && $(MAKE) distclean) > /dev/null || true
-(cd liburing && [ -f Makefile ] && $(MAKE) clean) > /dev/null || true
-(cd hdr_histogram && $(MAKE) clean) > /dev/null || true
-(cd fpconv && $(MAKE) clean) > /dev/null || true
-(rm -f .make-*)
Expand Down Expand Up @@ -116,3 +117,11 @@ jemalloc: .make-prerequisites
cd jemalloc && $(MAKE) lib/libjemalloc.a

.PHONY: jemalloc

liburing: .make-prerequisites
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
cd liburing && ./configure --cc=gcc --cxx=g++
cd liburing && $(MAKE)


.PHONY: liburing
38 changes: 38 additions & 0 deletions deps/liburing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
*.rej
*.orig
*~
/*.patch

*.d
*.o
*.o[ls]

/src/liburing.a
/src/liburing.so*
/src/liburing-ffi.a
/src/liburing-ffi.so*
/src/include/liburing/compat.h
/src/include/liburing/io_uring_version.h

/examples/io_uring-close-test
/examples/io_uring-cp
/examples/io_uring-test
/examples/io_uring-udp
/examples/link-cp
/examples/ucontext-cp
/examples/poll-bench
/examples/send-zerocopy
/examples/rsrc-update-bench

/test/*.t
/test/*.dmesg
/test/output/

config-host.h
config-host.mak
config.log

liburing.pc
liburing-ffi.pc

cscope.out
74 changes: 74 additions & 0 deletions deps/liburing/CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
liburing-2.5 release

- Add support for io_uring_prep_cmd_sock()
- Add support for application allocated ring memory, for placing rings
in huge mem. Available through io_uring_queue_init_mem().
- Add support for registered ring fds
- Various documentation updates
- Various fixes

liburing-2.4 release

- Add io_uring_{major,minor,check}_version() functions.
- Add IO_URING_{MAJOR,MINOR,CHECK}_VERSION() macros.
- FFI support (for non-C/C++ languages integration).
- Add io_uring_prep_msg_ring_cqe_flags() function.
- Deprecate --nolibc configure option.
- CONFIG_NOLIBC is always enabled on x86-64, x86, and aarch64.
- Add support for IORING_REGISTER_USE_REGISTERED_RING and use if available.
- Add io_uring_close_ring_fd() function.
- Add io_uring_prep_msg_ring_fd_alloc function.
- Add io_uring_free_buf_ring() and io_uring_setup_buf_ring() functions.
- Ensure that io_uring_prep_accept_direct(), io_uring_prep_openat_direct(),
io_uring_prep_openat2_direct(), io_uring_prep_msg_ring_fd(), and
io_uring_prep_socket_direct() factor in being called with
IORING_FILE_INDEX_ALLOC for allocating a direct descriptor.
- Add io_uring_prep_sendto() function.
- Add io_uring_prep_cmd_sock() function.

liburing-2.3 release

- Support non-libc build for aarch64.
- Add io_uring_{enter,enter2,register,setup} syscall functions.
- Add sync cancel interface, io_uring_register_sync_cancel().
- Fix return value of io_uring_submit_and_wait_timeout() to match the
man page.
- Improvements to the regression tests
- Add support and test case for passthrough IO
- Add recv and recvmsg multishot helpers and support
- Add documentation and support for IORING_SETUP_DEFER_TASKRUN
- Fix potential missing kernel entry with IORING_SETUP_IOPOLL
- Add support and documentation for zero-copy network transmit
- Various optimizations
- Many cleanups
- Many man page additions and updates

liburing-2.2 release

- Support non-libc builds.
- Optimized syscall handling for x86-64/x86/aarch64.
- Enable non-lib function calls for fast path functions.
- Add support for multishot accept.
- io_uring_register_files() will set RLIMIT_NOFILE if necessary.
- Add support for registered ring fds, io_uring_register_ring_fd(),
reducing the overhead of an io_uring_enter() system call.
- Add support for the message ring opcode.
- Add support for newer request cancelation features.
- Add support for IORING_SETUP_COOP_TASKRUN, which can help reduce the
overhead of io_uring in general. Most applications should set this flag,
see the io_uring_setup.2 man page for details.
- Add support for registering a sparse buffer and file set.
- Add support for a new buffer provide scheme, see
io_uring_register_buf_ring.3 for details.
- Add io_uring_submit_and_wait_timeout() for submitting IO and waiting
for completions with a timeout.
- Add io_uring_prep_{read,write}v2 prep helpers.
- Add io_uring_prep_close_direct() helper.
- Add support for SQE128 and CQE32, which are doubly sized SQE and CQE
rings. This is needed for some cases of the new IORING_OP_URING_CMD,
notably for NVMe passthrough.
- ~5500 lines of man page additions, including adding ~90 new man pages.
- Synced with the 5.19 kernel release, supporting all the features of
5.19 and earlier.
- 24 new regression test cases, and ~7000 lines of new tests in general.
- General optimizations and fixes.
11 changes: 11 additions & 0 deletions deps/liburing/CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cff-version: 1.2.0
preferred-citation:
type: software
authors:
- family-names: "Axboe"
given-names: "Jens"
email: axboe@kernel.dk
title: "liburing library for io_uring"
year: 2022
url: "https://github.com/axboe/liburing"
licence: MIT