polyphony 0.94 → 0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +2 -2
- data/.gitignore +3 -3
- data/CHANGELOG.md +14 -0
- data/docs/api-reference/fiber.md +2 -2
- data/docs/api-reference/object.md +3 -3
- data/docs/main-concepts/exception-handling.md +2 -2
- data/ext/polyphony/backend_common.c +3 -3
- data/ext/polyphony/backend_io_uring.c +18 -16
- data/ext/polyphony/event.c +1 -1
- data/ext/polyphony/extconf.rb +5 -3
- data/ext/polyphony/fiber.c +5 -13
- data/ext/polyphony/io_extensions.c +1 -1
- data/ext/polyphony/pipe.c +1 -1
- data/ext/polyphony/polyphony.c +1 -1
- data/ext/polyphony/polyphony_ext.c +1 -1
- data/ext/polyphony/queue.c +1 -1
- data/ext/polyphony/ring_buffer.c +1 -0
- data/ext/polyphony/socket_extensions.c +1 -1
- data/ext/polyphony/thread.c +1 -1
- data/lib/polyphony/extensions/enumerator.rb +16 -0
- data/lib/polyphony/extensions/socket.rb +2 -0
- data/lib/polyphony/extensions.rb +1 -0
- data/lib/polyphony/version.rb +1 -1
- data/polyphony.gemspec +2 -2
- data/test/test_backend.rb +5 -1
- data/test/test_enumerator.rb +46 -0
- data/test/test_io.rb +241 -216
- data/test/test_socket.rb +1 -1
- data/test/test_thread_pool.rb +3 -3
- data/vendor/liburing/.github/workflows/build.yml +51 -5
- data/vendor/liburing/.github/workflows/shellcheck.yml +1 -1
- data/vendor/liburing/.gitignore +6 -123
- data/vendor/liburing/CHANGELOG +35 -0
- data/vendor/liburing/CITATION.cff +11 -0
- data/vendor/liburing/LICENSE +16 -3
- data/vendor/liburing/Makefile +3 -1
- data/vendor/liburing/Makefile.common +1 -0
- data/vendor/liburing/README +14 -2
- data/vendor/liburing/SECURITY.md +6 -0
- data/vendor/liburing/configure +16 -15
- data/vendor/liburing/examples/Makefile +4 -1
- data/vendor/liburing/examples/io_uring-udp.c +395 -0
- data/vendor/liburing/examples/poll-bench.c +101 -0
- data/vendor/liburing/examples/send-zerocopy.c +339 -0
- data/vendor/liburing/liburing.spec +1 -1
- data/vendor/liburing/man/io_uring.7 +38 -11
- data/vendor/liburing/man/io_uring_buf_ring_add.3 +53 -0
- data/vendor/liburing/man/io_uring_buf_ring_advance.3 +31 -0
- data/vendor/liburing/man/io_uring_buf_ring_cq_advance.3 +41 -0
- data/vendor/liburing/man/io_uring_buf_ring_init.3 +30 -0
- data/vendor/liburing/man/io_uring_buf_ring_mask.3 +27 -0
- data/vendor/liburing/man/io_uring_cq_advance.3 +29 -15
- data/vendor/liburing/man/io_uring_cq_has_overflow.3 +25 -0
- data/vendor/liburing/man/io_uring_cq_ready.3 +9 -8
- data/vendor/liburing/man/io_uring_cqe_get_data.3 +32 -13
- data/vendor/liburing/man/io_uring_cqe_get_data64.3 +1 -0
- data/vendor/liburing/man/io_uring_cqe_seen.3 +22 -12
- data/vendor/liburing/man/io_uring_enter.2 +249 -32
- data/vendor/liburing/man/io_uring_enter2.2 +1 -0
- data/vendor/liburing/man/io_uring_free_probe.3 +11 -8
- data/vendor/liburing/man/io_uring_get_events.3 +33 -0
- data/vendor/liburing/man/io_uring_get_probe.3 +9 -8
- data/vendor/liburing/man/io_uring_get_sqe.3 +29 -10
- data/vendor/liburing/man/io_uring_opcode_supported.3 +11 -10
- data/vendor/liburing/man/io_uring_peek_cqe.3 +38 -0
- data/vendor/liburing/man/io_uring_prep_accept.3 +197 -0
- data/vendor/liburing/man/io_uring_prep_accept_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_cancel.3 +118 -0
- data/vendor/liburing/man/io_uring_prep_cancel64.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_close.3 +59 -0
- data/vendor/liburing/man/io_uring_prep_close_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_connect.3 +66 -0
- data/vendor/liburing/man/io_uring_prep_fadvise.3 +59 -0
- data/vendor/liburing/man/io_uring_prep_fallocate.3 +59 -0
- data/vendor/liburing/man/io_uring_prep_files_update.3 +92 -0
- data/vendor/liburing/man/io_uring_prep_fsync.3 +70 -0
- data/vendor/liburing/man/io_uring_prep_link.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_linkat.3 +91 -0
- data/vendor/liburing/man/io_uring_prep_madvise.3 +56 -0
- data/vendor/liburing/man/io_uring_prep_mkdir.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_mkdirat.3 +83 -0
- data/vendor/liburing/man/io_uring_prep_msg_ring.3 +39 -25
- data/vendor/liburing/man/io_uring_prep_multishot_accept.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_multishot_accept_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_nop.3 +28 -0
- data/vendor/liburing/man/io_uring_prep_openat.3 +117 -0
- data/vendor/liburing/man/io_uring_prep_openat2.3 +117 -0
- data/vendor/liburing/man/io_uring_prep_openat2_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_openat_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_poll_add.3 +72 -0
- data/vendor/liburing/man/io_uring_prep_poll_multishot.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_poll_remove.3 +55 -0
- data/vendor/liburing/man/io_uring_prep_poll_update.3 +89 -0
- data/vendor/liburing/man/io_uring_prep_provide_buffers.3 +131 -0
- data/vendor/liburing/man/io_uring_prep_read.3 +33 -14
- data/vendor/liburing/man/io_uring_prep_read_fixed.3 +39 -21
- data/vendor/liburing/man/io_uring_prep_readv.3 +49 -15
- data/vendor/liburing/man/io_uring_prep_readv2.3 +49 -17
- data/vendor/liburing/man/io_uring_prep_recv.3 +105 -0
- data/vendor/liburing/man/io_uring_prep_recv_multishot.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_recvmsg.3 +124 -0
- data/vendor/liburing/man/io_uring_prep_recvmsg_multishot.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_remove_buffers.3 +52 -0
- data/vendor/liburing/man/io_uring_prep_rename.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_renameat.3 +96 -0
- data/vendor/liburing/man/io_uring_prep_send.3 +57 -0
- data/vendor/liburing/man/io_uring_prep_send_zc.3 +64 -0
- data/vendor/liburing/man/io_uring_prep_sendmsg.3 +69 -0
- data/vendor/liburing/man/io_uring_prep_shutdown.3 +53 -0
- data/vendor/liburing/man/io_uring_prep_socket.3 +118 -0
- data/vendor/liburing/man/io_uring_prep_socket_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_socket_direct_alloc.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_splice.3 +80 -0
- data/vendor/liburing/man/io_uring_prep_statx.3 +74 -0
- data/vendor/liburing/man/io_uring_prep_symlink.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_symlinkat.3 +85 -0
- data/vendor/liburing/man/io_uring_prep_sync_file_range.3 +59 -0
- data/vendor/liburing/man/io_uring_prep_tee.3 +74 -0
- data/vendor/liburing/man/io_uring_prep_timeout.3 +95 -0
- data/vendor/liburing/man/io_uring_prep_timeout_remove.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_timeout_update.3 +98 -0
- data/vendor/liburing/man/io_uring_prep_unlink.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_unlinkat.3 +82 -0
- data/vendor/liburing/man/io_uring_prep_write.3 +32 -15
- data/vendor/liburing/man/io_uring_prep_write_fixed.3 +39 -21
- data/vendor/liburing/man/io_uring_prep_writev.3 +50 -16
- data/vendor/liburing/man/io_uring_prep_writev2.3 +50 -17
- data/vendor/liburing/man/io_uring_queue_exit.3 +3 -4
- data/vendor/liburing/man/io_uring_queue_init.3 +58 -13
- data/vendor/liburing/man/io_uring_queue_init_params.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_cmsg_firsthdr.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_cmsg_nexthdr.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_name.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_out.3 +78 -0
- data/vendor/liburing/man/io_uring_recvmsg_payload.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_payload_length.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_validate.3 +1 -0
- data/vendor/liburing/man/io_uring_register.2 +153 -13
- data/vendor/liburing/man/io_uring_register_buf_ring.3 +140 -0
- data/vendor/liburing/man/io_uring_register_buffers.3 +32 -12
- data/vendor/liburing/man/io_uring_register_eventfd.3 +51 -0
- data/vendor/liburing/man/io_uring_register_eventfd_async.3 +1 -0
- data/vendor/liburing/man/io_uring_register_file_alloc_range.3 +52 -0
- data/vendor/liburing/man/io_uring_register_files.3 +33 -11
- data/vendor/liburing/man/io_uring_register_files_sparse.3 +1 -0
- data/vendor/liburing/man/io_uring_register_iowq_aff.3 +61 -0
- data/vendor/liburing/man/io_uring_register_iowq_max_workers.3 +71 -0
- data/vendor/liburing/man/io_uring_register_ring_fd.3 +49 -0
- data/vendor/liburing/man/io_uring_register_sync_cancel.3 +71 -0
- data/vendor/liburing/man/io_uring_setup.2 +119 -13
- data/vendor/liburing/man/io_uring_sq_ready.3 +14 -8
- data/vendor/liburing/man/io_uring_sq_space_left.3 +9 -9
- data/vendor/liburing/man/io_uring_sqe_set_data.3 +29 -11
- data/vendor/liburing/man/io_uring_sqe_set_data64.3 +1 -0
- data/vendor/liburing/man/io_uring_sqe_set_flags.3 +38 -11
- data/vendor/liburing/man/io_uring_sqring_wait.3 +13 -9
- data/vendor/liburing/man/io_uring_submit.3 +29 -12
- data/vendor/liburing/man/io_uring_submit_and_get_events.3 +31 -0
- data/vendor/liburing/man/io_uring_submit_and_wait.3 +16 -12
- data/vendor/liburing/man/io_uring_submit_and_wait_timeout.3 +30 -23
- data/vendor/liburing/man/io_uring_unregister_buf_ring.3 +30 -0
- data/vendor/liburing/man/io_uring_unregister_buffers.3 +11 -10
- data/vendor/liburing/man/io_uring_unregister_eventfd.3 +1 -0
- data/vendor/liburing/man/io_uring_unregister_files.3 +11 -10
- data/vendor/liburing/man/io_uring_unregister_iowq_aff.3 +1 -0
- data/vendor/liburing/man/io_uring_unregister_ring_fd.3 +32 -0
- data/vendor/liburing/man/io_uring_wait_cqe.3 +19 -12
- data/vendor/liburing/man/io_uring_wait_cqe_nr.3 +21 -14
- data/vendor/liburing/man/io_uring_wait_cqe_timeout.3 +27 -13
- data/vendor/liburing/man/io_uring_wait_cqes.3 +24 -14
- data/vendor/liburing/src/Makefile +8 -7
- data/vendor/liburing/src/arch/aarch64/lib.h +48 -0
- data/vendor/liburing/src/arch/aarch64/syscall.h +0 -4
- data/vendor/liburing/src/arch/generic/lib.h +0 -4
- data/vendor/liburing/src/arch/generic/syscall.h +29 -16
- data/vendor/liburing/src/arch/syscall-defs.h +41 -14
- data/vendor/liburing/src/arch/x86/lib.h +0 -21
- data/vendor/liburing/src/arch/x86/syscall.h +146 -10
- data/vendor/liburing/src/include/liburing/io_uring.h +245 -5
- data/vendor/liburing/src/include/liburing.h +468 -35
- data/vendor/liburing/src/int_flags.h +1 -0
- data/vendor/liburing/src/lib.h +20 -16
- data/vendor/liburing/src/liburing.map +16 -0
- data/vendor/liburing/src/nolibc.c +1 -1
- data/vendor/liburing/src/queue.c +87 -55
- data/vendor/liburing/src/register.c +129 -53
- data/vendor/liburing/src/setup.c +65 -28
- data/vendor/liburing/src/syscall.c +14 -32
- data/vendor/liburing/src/syscall.h +12 -64
- data/vendor/liburing/test/{232c93d07b74-test.c → 232c93d07b74.c} +8 -9
- data/vendor/liburing/test/{35fa71a030ca-test.c → 35fa71a030ca.c} +4 -4
- data/vendor/liburing/test/{500f9fbadef8-test.c → 500f9fbadef8.c} +7 -7
- data/vendor/liburing/test/{7ad0e4b2f83c-test.c → 7ad0e4b2f83c.c} +8 -7
- data/vendor/liburing/test/{8a9973408177-test.c → 8a9973408177.c} +4 -3
- data/vendor/liburing/test/{917257daa0fe-test.c → 917257daa0fe.c} +3 -2
- data/vendor/liburing/test/Makefile +60 -62
- data/vendor/liburing/test/{a0908ae19763-test.c → a0908ae19763.c} +3 -2
- data/vendor/liburing/test/{a4c0b3decb33-test.c → a4c0b3decb33.c} +3 -2
- data/vendor/liburing/test/accept-link.c +5 -4
- data/vendor/liburing/test/accept-reuse.c +17 -16
- data/vendor/liburing/test/accept-test.c +14 -10
- data/vendor/liburing/test/accept.c +529 -107
- data/vendor/liburing/test/across-fork.c +7 -6
- data/vendor/liburing/test/{b19062a56726-test.c → b19062a56726.c} +3 -2
- data/vendor/liburing/test/{b5837bd5311d-test.c → b5837bd5311d.c} +10 -9
- data/vendor/liburing/test/buf-ring.c +420 -0
- data/vendor/liburing/test/{ce593a6c480a-test.c → ce593a6c480a.c} +15 -12
- data/vendor/liburing/test/connect.c +8 -7
- data/vendor/liburing/test/cq-full.c +5 -4
- data/vendor/liburing/test/cq-overflow.c +242 -12
- data/vendor/liburing/test/cq-peek-batch.c +5 -4
- data/vendor/liburing/test/cq-ready.c +5 -4
- data/vendor/liburing/test/cq-size.c +5 -4
- data/vendor/liburing/test/{d4ae271dfaae-test.c → d4ae271dfaae.c} +2 -2
- data/vendor/liburing/test/{d77a67ed5f27-test.c → d77a67ed5f27.c} +6 -6
- data/vendor/liburing/test/defer-taskrun.c +336 -0
- data/vendor/liburing/test/defer.c +26 -14
- data/vendor/liburing/test/double-poll-crash.c +15 -5
- data/vendor/liburing/test/drop-submit.c +5 -3
- data/vendor/liburing/test/{eeed8b54e0df-test.c → eeed8b54e0df.c} +7 -6
- data/vendor/liburing/test/empty-eownerdead.c +4 -4
- data/vendor/liburing/test/eventfd-disable.c +48 -20
- data/vendor/liburing/test/eventfd-reg.c +10 -9
- data/vendor/liburing/test/eventfd-ring.c +13 -12
- data/vendor/liburing/test/eventfd.c +13 -12
- data/vendor/liburing/test/exit-no-cleanup.c +1 -1
- data/vendor/liburing/test/fadvise.c +3 -3
- data/vendor/liburing/test/fallocate.c +16 -9
- data/vendor/liburing/test/{fc2a85cb02ef-test.c → fc2a85cb02ef.c} +4 -3
- data/vendor/liburing/test/fd-pass.c +187 -0
- data/vendor/liburing/test/file-register.c +302 -36
- data/vendor/liburing/test/file-update.c +62 -4
- data/vendor/liburing/test/file-verify.c +6 -2
- data/vendor/liburing/test/files-exit-hang-poll.c +11 -25
- data/vendor/liburing/test/files-exit-hang-timeout.c +13 -10
- data/vendor/liburing/test/fixed-buf-iter.c +115 -0
- data/vendor/liburing/test/fixed-link.c +10 -10
- data/vendor/liburing/test/fixed-reuse.c +160 -0
- data/vendor/liburing/test/fpos.c +6 -3
- data/vendor/liburing/test/fsync.c +3 -3
- data/vendor/liburing/test/hardlink.c +10 -6
- data/vendor/liburing/test/helpers.c +137 -4
- data/vendor/liburing/test/helpers.h +27 -0
- data/vendor/liburing/test/io-cancel.c +16 -11
- data/vendor/liburing/test/io_uring_enter.c +46 -81
- data/vendor/liburing/test/io_uring_passthrough.c +451 -0
- data/vendor/liburing/test/io_uring_register.c +59 -229
- data/vendor/liburing/test/io_uring_setup.c +24 -29
- data/vendor/liburing/test/iopoll-leak.c +85 -0
- data/vendor/liburing/test/iopoll.c +16 -9
- data/vendor/liburing/test/lfs-openat-write.c +3 -1
- data/vendor/liburing/test/link-timeout.c +4 -3
- data/vendor/liburing/test/link.c +8 -7
- data/vendor/liburing/test/madvise.c +2 -2
- data/vendor/liburing/test/mkdir.c +9 -5
- data/vendor/liburing/test/msg-ring.c +46 -20
- data/vendor/liburing/test/multicqes_drain.c +51 -12
- data/vendor/liburing/test/nolibc.c +60 -0
- data/vendor/liburing/test/nop.c +78 -16
- data/vendor/liburing/test/nvme.h +168 -0
- data/vendor/liburing/test/open-direct-link.c +188 -0
- data/vendor/liburing/test/open-direct-pick.c +180 -0
- data/vendor/liburing/test/openat2.c +3 -3
- data/vendor/liburing/test/poll-cancel-all.c +472 -0
- data/vendor/liburing/test/poll-link.c +9 -18
- data/vendor/liburing/test/poll-mshot-overflow.c +162 -0
- data/vendor/liburing/test/poll-mshot-update.c +83 -33
- data/vendor/liburing/test/pollfree.c +2 -2
- data/vendor/liburing/test/read-before-exit.c +112 -0
- data/vendor/liburing/test/read-write.c +83 -1
- data/vendor/liburing/test/recv-msgall-stream.c +398 -0
- data/vendor/liburing/test/recv-msgall.c +265 -0
- data/vendor/liburing/test/recv-multishot.c +505 -0
- data/vendor/liburing/test/rename.c +2 -5
- data/vendor/liburing/test/ring-leak.c +97 -0
- data/vendor/liburing/test/ringbuf-read.c +200 -0
- data/vendor/liburing/test/rsrc_tags.c +25 -13
- data/vendor/liburing/test/runtests-quiet.sh +11 -0
- data/vendor/liburing/test/runtests.sh +18 -20
- data/vendor/liburing/test/rw_merge_test.c +3 -2
- data/vendor/liburing/test/send-zerocopy.c +684 -0
- data/vendor/liburing/test/send_recv.c +49 -2
- data/vendor/liburing/test/send_recvmsg.c +165 -55
- data/vendor/liburing/test/shutdown.c +3 -4
- data/vendor/liburing/test/sigfd-deadlock.c +22 -8
- data/vendor/liburing/test/single-issuer.c +171 -0
- data/vendor/liburing/test/socket-rw-eagain.c +2 -12
- data/vendor/liburing/test/socket-rw-offset.c +2 -11
- data/vendor/liburing/test/socket-rw.c +2 -11
- data/vendor/liburing/test/socket.c +409 -0
- data/vendor/liburing/test/sq-poll-dup.c +1 -1
- data/vendor/liburing/test/sq-poll-share.c +1 -1
- data/vendor/liburing/test/statx.c +2 -2
- data/vendor/liburing/test/submit-and-wait.c +108 -0
- data/vendor/liburing/test/submit-link-fail.c +5 -3
- data/vendor/liburing/test/submit-reuse.c +0 -2
- data/vendor/liburing/test/sync-cancel.c +235 -0
- data/vendor/liburing/test/test.h +35 -0
- data/vendor/liburing/test/timeout-overflow.c +11 -11
- data/vendor/liburing/test/timeout.c +7 -7
- data/vendor/liburing/test/tty-write-dpoll.c +60 -0
- data/vendor/liburing/test/unlink.c +1 -1
- data/vendor/liburing/test/xattr.c +425 -0
- metadata +143 -22
- data/Gemfile.lock +0 -78
data/test/test_socket.rb
CHANGED
|
@@ -44,7 +44,7 @@ class SocketTest < MiniTest::Test
|
|
|
44
44
|
client = TCPSocket.open('google.com', 80)
|
|
45
45
|
client.write("GET / HTTP/1.0\r\nHost: google.com\r\n\r\n")
|
|
46
46
|
result = nil
|
|
47
|
-
move_on_after(
|
|
47
|
+
move_on_after(3) {
|
|
48
48
|
result = client.read
|
|
49
49
|
}
|
|
50
50
|
assert result =~ /HTTP\/1.0 301 Moved Permanently/
|
data/test/test_thread_pool.rb
CHANGED
|
@@ -25,7 +25,7 @@ class ThreadPoolTest < MiniTest::Test
|
|
|
25
25
|
threads = []
|
|
26
26
|
results = []
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
20.times do |i|
|
|
29
29
|
spin do
|
|
30
30
|
results << @pool.process do
|
|
31
31
|
threads << Thread.current
|
|
@@ -38,7 +38,7 @@ class ThreadPoolTest < MiniTest::Test
|
|
|
38
38
|
suspend
|
|
39
39
|
|
|
40
40
|
assert_equal @pool.size, threads.uniq.size
|
|
41
|
-
assert_equal (0..
|
|
41
|
+
assert_equal (0..19).map { |i| i * 10}, results.sort
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def test_process_with_exception
|
|
@@ -68,7 +68,7 @@ class ThreadPoolTest < MiniTest::Test
|
|
|
68
68
|
assert_in_range 0.0..0.009, elapsed if IS_LINUX
|
|
69
69
|
assert buffer.size < 2
|
|
70
70
|
|
|
71
|
-
sleep 0.
|
|
71
|
+
sleep 0.20 # allow time for threads to spawn
|
|
72
72
|
assert_equal @pool.size, threads.uniq.size
|
|
73
73
|
assert_equal (0..9).to_a, buffer.sort if IS_LINUX
|
|
74
74
|
end
|
|
@@ -7,7 +7,7 @@ on:
|
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
9
|
build:
|
|
10
|
-
runs-on: ubuntu-
|
|
10
|
+
runs-on: ubuntu-22.04
|
|
11
11
|
|
|
12
12
|
strategy:
|
|
13
13
|
fail-fast: false
|
|
@@ -26,6 +26,7 @@ jobs:
|
|
|
26
26
|
cxx_pkg: clang
|
|
27
27
|
cc: clang
|
|
28
28
|
cxx: clang++
|
|
29
|
+
extra_flags: -Wshorten-64-to-32
|
|
29
30
|
|
|
30
31
|
# x86 (32-bit) gcc
|
|
31
32
|
- arch: i686
|
|
@@ -48,8 +49,46 @@ jobs:
|
|
|
48
49
|
cc: arm-linux-gnueabi-gcc
|
|
49
50
|
cxx: arm-linux-gnueabi-g++
|
|
50
51
|
|
|
52
|
+
# powerpc64
|
|
53
|
+
- arch: powerpc64
|
|
54
|
+
cc_pkg: gcc-powerpc64-linux-gnu
|
|
55
|
+
cxx_pkg: g++-powerpc64-linux-gnu
|
|
56
|
+
cc: powerpc64-linux-gnu-gcc
|
|
57
|
+
cxx: powerpc64-linux-gnu-g++
|
|
58
|
+
|
|
59
|
+
# powerpc
|
|
60
|
+
- arch: powerpc
|
|
61
|
+
cc_pkg: gcc-powerpc-linux-gnu
|
|
62
|
+
cxx_pkg: g++-powerpc-linux-gnu
|
|
63
|
+
cc: powerpc-linux-gnu-gcc
|
|
64
|
+
cxx: powerpc-linux-gnu-g++
|
|
65
|
+
|
|
66
|
+
# alpha
|
|
67
|
+
- arch: alpha
|
|
68
|
+
cc_pkg: gcc-alpha-linux-gnu
|
|
69
|
+
cxx_pkg: g++-alpha-linux-gnu
|
|
70
|
+
cc: alpha-linux-gnu-gcc
|
|
71
|
+
cxx: alpha-linux-gnu-g++
|
|
72
|
+
|
|
73
|
+
# mips64
|
|
74
|
+
- arch: mips64
|
|
75
|
+
cc_pkg: gcc-mips64-linux-gnuabi64
|
|
76
|
+
cxx_pkg: g++-mips64-linux-gnuabi64
|
|
77
|
+
cc: mips64-linux-gnuabi64-gcc
|
|
78
|
+
cxx: mips64-linux-gnuabi64-g++
|
|
79
|
+
|
|
80
|
+
# mips
|
|
81
|
+
- arch: mips
|
|
82
|
+
cc_pkg: gcc-mips-linux-gnu
|
|
83
|
+
cxx_pkg: g++-mips-linux-gnu
|
|
84
|
+
cc: mips-linux-gnu-gcc
|
|
85
|
+
cxx: mips-linux-gnu-g++
|
|
86
|
+
|
|
51
87
|
env:
|
|
52
|
-
FLAGS: -g -
|
|
88
|
+
FLAGS: -g -O3 -Wall -Wextra -Werror
|
|
89
|
+
|
|
90
|
+
# Flags for building sources in src/ dir only.
|
|
91
|
+
LIBURING_CFLAGS: ${{matrix.extra_flags}}
|
|
53
92
|
|
|
54
93
|
steps:
|
|
55
94
|
- name: Checkout source
|
|
@@ -57,8 +96,15 @@ jobs:
|
|
|
57
96
|
|
|
58
97
|
- name: Install Compilers
|
|
59
98
|
run: |
|
|
60
|
-
|
|
61
|
-
|
|
99
|
+
if [[ "${{matrix.cc_pkg}}" == "clang" ]]; then \
|
|
100
|
+
wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh; \
|
|
101
|
+
sudo bash /tmp/llvm.sh 16; \
|
|
102
|
+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 400; \
|
|
103
|
+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 400; \
|
|
104
|
+
else \
|
|
105
|
+
sudo apt-get update -y; \
|
|
106
|
+
sudo apt-get install -y ${{matrix.cc_pkg}} ${{matrix.cxx_pkg}}; \
|
|
107
|
+
fi;
|
|
62
108
|
|
|
63
109
|
- name: Display compiler versions
|
|
64
110
|
run: |
|
|
@@ -72,7 +118,7 @@ jobs:
|
|
|
72
118
|
|
|
73
119
|
- name: Build nolibc
|
|
74
120
|
run: |
|
|
75
|
-
if [[ "${{matrix.arch}}" == "x86_64" ]]; then \
|
|
121
|
+
if [[ "${{matrix.arch}}" == "x86_64" || "${{matrix.arch}}" == "i686" || "${{matrix.arch}}" == "aarch64" ]]; then \
|
|
76
122
|
make clean; \
|
|
77
123
|
./configure --cc=${{matrix.cc}} --cxx=${{matrix.cxx}} --nolibc; \
|
|
78
124
|
make -j$(nproc) V=1 CPPFLAGS="-Werror" CFLAGS="$FLAGS" CXXFLAGS="$FLAGS"; \
|
data/vendor/liburing/.gitignore
CHANGED
|
@@ -13,132 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
/examples/io_uring-cp
|
|
15
15
|
/examples/io_uring-test
|
|
16
|
+
/examples/io_uring-udp
|
|
16
17
|
/examples/link-cp
|
|
17
18
|
/examples/ucontext-cp
|
|
19
|
+
/examples/poll-bench
|
|
20
|
+
/examples/send-zerocopy
|
|
18
21
|
|
|
19
|
-
/test
|
|
20
|
-
/test/35fa71a030ca-test
|
|
21
|
-
/test/500f9fbadef8-test
|
|
22
|
-
/test/7ad0e4b2f83c-test
|
|
23
|
-
/test/8a9973408177-test
|
|
24
|
-
/test/917257daa0fe-test
|
|
25
|
-
/test/a0908ae19763-test
|
|
26
|
-
/test/a4c0b3decb33-test
|
|
27
|
-
/test/accept
|
|
28
|
-
/test/accept-link
|
|
29
|
-
/test/accept-reuse
|
|
30
|
-
/test/accept-test
|
|
31
|
-
/test/across-fork
|
|
32
|
-
/test/b19062a56726-test
|
|
33
|
-
/test/b5837bd5311d-test
|
|
34
|
-
/test/ce593a6c480a-test
|
|
35
|
-
/test/close-opath
|
|
36
|
-
/test/config.local
|
|
37
|
-
/test/connect
|
|
38
|
-
/test/cq-full
|
|
39
|
-
/test/cq-overflow
|
|
40
|
-
/test/cq-overflow-peek
|
|
41
|
-
/test/cq-peek-batch
|
|
42
|
-
/test/cq-ready
|
|
43
|
-
/test/cq-size
|
|
44
|
-
/test/d4ae271dfaae-test
|
|
45
|
-
/test/d77a67ed5f27-test
|
|
46
|
-
/test/defer
|
|
47
|
-
/test/double-poll-crash
|
|
48
|
-
/test/eeed8b54e0df-test
|
|
49
|
-
/test/empty-eownerdead
|
|
50
|
-
/test/eventfd
|
|
51
|
-
/test/eventfd-disable
|
|
52
|
-
/test/eventfd-reg
|
|
53
|
-
/test/eventfd-ring
|
|
54
|
-
/test/exit-no-cleanup
|
|
55
|
-
/test/fadvise
|
|
56
|
-
/test/fallocate
|
|
57
|
-
/test/fc2a85cb02ef-test
|
|
58
|
-
/test/file-register
|
|
59
|
-
/test/file-update
|
|
60
|
-
/test/file-verify
|
|
61
|
-
/test/files-exit-hang-poll
|
|
62
|
-
/test/files-exit-hang-timeout
|
|
63
|
-
/test/fixed-link
|
|
64
|
-
/test/fpos
|
|
65
|
-
/test/fsync
|
|
66
|
-
/test/hardlink
|
|
67
|
-
/test/io-cancel
|
|
68
|
-
/test/io_uring_enter
|
|
69
|
-
/test/io_uring_register
|
|
70
|
-
/test/io_uring_setup
|
|
71
|
-
/test/iopoll
|
|
72
|
-
/test/lfs-openat
|
|
73
|
-
/test/lfs-openat-write
|
|
74
|
-
/test/link
|
|
75
|
-
/test/link-timeout
|
|
76
|
-
/test/link_drain
|
|
77
|
-
/test/madvise
|
|
78
|
-
/test/mkdir
|
|
79
|
-
/test/msg-ring
|
|
80
|
-
/test/nop
|
|
81
|
-
/test/nop-all-sizes
|
|
82
|
-
/test/open-close
|
|
83
|
-
/test/openat2
|
|
84
|
-
/test/personality
|
|
85
|
-
/test/pipe-eof
|
|
86
|
-
/test/pipe-reuse
|
|
87
|
-
/test/poll
|
|
88
|
-
/test/poll-cancel
|
|
89
|
-
/test/poll-cancel-ton
|
|
90
|
-
/test/poll-link
|
|
91
|
-
/test/poll-many
|
|
92
|
-
/test/poll-ring
|
|
93
|
-
/test/poll-v-poll
|
|
94
|
-
/test/pollfree
|
|
95
|
-
/test/probe
|
|
96
|
-
/test/read-write
|
|
97
|
-
/test/register-restrictions
|
|
98
|
-
/test/rename
|
|
99
|
-
/test/ring-leak
|
|
100
|
-
/test/ring-leak2
|
|
101
|
-
/test/self
|
|
102
|
-
/test/send_recv
|
|
103
|
-
/test/send_recvmsg
|
|
104
|
-
/test/sendmsg_fs_cve
|
|
105
|
-
/test/shared-wq
|
|
106
|
-
/test/short-read
|
|
107
|
-
/test/shutdown
|
|
108
|
-
/test/sigfd-deadlock
|
|
109
|
-
/test/socket-rw
|
|
110
|
-
/test/socket-rw-eagain
|
|
111
|
-
/test/socket-rw-offset
|
|
112
|
-
/test/splice
|
|
113
|
-
/test/sq-full
|
|
114
|
-
/test/sq-full-cpp
|
|
115
|
-
/test/sq-poll-dup
|
|
116
|
-
/test/sq-poll-kthread
|
|
117
|
-
/test/sq-poll-share
|
|
118
|
-
/test/sqpoll-disable-exit
|
|
119
|
-
/test/sqpoll-exit-hang
|
|
120
|
-
/test/sqpoll-sleep
|
|
121
|
-
/test/sq-space_left
|
|
122
|
-
/test/statx
|
|
123
|
-
/test/stdout
|
|
124
|
-
/test/submit-reuse
|
|
125
|
-
/test/symlink
|
|
126
|
-
/test/teardowns
|
|
127
|
-
/test/thread-exit
|
|
128
|
-
/test/timeout
|
|
129
|
-
/test/timeout-new
|
|
130
|
-
/test/timeout-overflow
|
|
131
|
-
/test/unlink
|
|
132
|
-
/test/wakeup-hang
|
|
133
|
-
/test/multicqes_drain
|
|
134
|
-
/test/poll-mshot-update
|
|
135
|
-
/test/rsrc_tags
|
|
136
|
-
/test/rw_merge_test
|
|
137
|
-
/test/sqpoll-cancel-hang
|
|
138
|
-
/test/testfile
|
|
139
|
-
/test/submit-link-fail
|
|
140
|
-
/test/exec-target
|
|
141
|
-
/test/skip-cqe
|
|
22
|
+
/test/*.t
|
|
142
23
|
/test/*.dmesg
|
|
143
24
|
/test/output/
|
|
144
25
|
|
|
@@ -147,3 +28,5 @@ config-host.mak
|
|
|
147
28
|
config.log
|
|
148
29
|
|
|
149
30
|
liburing.pc
|
|
31
|
+
|
|
32
|
+
cscope.out
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
liburing-2.3 release
|
|
2
|
+
|
|
3
|
+
- Support non-libc build for aarch64.
|
|
4
|
+
- Add io_uring_{enter,enter2,register,setup} syscall functions.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
liburing-2.2 release
|
|
8
|
+
|
|
9
|
+
- Support non-libc builds.
|
|
10
|
+
- Optimized syscall handling for x86-64/x86/aarch64.
|
|
11
|
+
- Enable non-lib function calls for fast path functions.
|
|
12
|
+
- Add support for multishot accept.
|
|
13
|
+
- io_uring_register_files() will set RLIMIT_NOFILE if necessary.
|
|
14
|
+
- Add support for registered ring fds, io_uring_register_ring_fd(),
|
|
15
|
+
reducing the overhead of an io_uring_enter() system call.
|
|
16
|
+
- Add support for the message ring opcode.
|
|
17
|
+
- Add support for newer request cancelation features.
|
|
18
|
+
- Add support for IORING_SETUP_COOP_TASKRUN, which can help reduce the
|
|
19
|
+
overhead of io_uring in general. Most applications should set this flag,
|
|
20
|
+
see the io_uring_setup.2 man page for details.
|
|
21
|
+
- Add support for registering a sparse buffer and file set.
|
|
22
|
+
- Add support for a new buffer provide scheme, see
|
|
23
|
+
io_uring_register_buf_ring.3 for details.
|
|
24
|
+
- Add io_uring_submit_and_wait_timeout() for submitting IO and waiting
|
|
25
|
+
for completions with a timeout.
|
|
26
|
+
- Add io_uring_prep_{read,write}v2 prep helpers.
|
|
27
|
+
- Add io_uring_prep_close_direct() helper.
|
|
28
|
+
- Add support for SQE128 and CQE32, which are doubly sized SQE and CQE
|
|
29
|
+
rings. This is needed for some cases of the new IORING_OP_URING_CMD,
|
|
30
|
+
notably for NVMe passthrough.
|
|
31
|
+
- ~5500 lines of man page additions, including adding ~90 new man pages.
|
|
32
|
+
- Synced with the 5.19 kernel release, supporting all the features of
|
|
33
|
+
5.19 and earlier.
|
|
34
|
+
- 24 new regression test cases, and ~7000 lines of new tests in general.
|
|
35
|
+
- General optimizations and fixes.
|
data/vendor/liburing/LICENSE
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
Copyright 2020 Jens Axboe
|
|
2
2
|
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
+
copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
4
10
|
|
|
5
|
-
The above copyright notice and this permission notice shall be included
|
|
11
|
+
The above copyright notice and this permission notice shall be included
|
|
12
|
+
in all copies or substantial portions of the Software.
|
|
6
13
|
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
15
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
17
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
18
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
19
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
20
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/vendor/liburing/Makefile
CHANGED
|
@@ -19,8 +19,10 @@ partcheck: all
|
|
|
19
19
|
|
|
20
20
|
runtests: all
|
|
21
21
|
@$(MAKE) -C test runtests
|
|
22
|
-
runtests-loop:
|
|
22
|
+
runtests-loop: all
|
|
23
23
|
@$(MAKE) -C test runtests-loop
|
|
24
|
+
runtests-parallel: all
|
|
25
|
+
@$(MAKE) -C test runtests-parallel
|
|
24
26
|
|
|
25
27
|
config-host.mak: configure
|
|
26
28
|
@if [ ! -e "$@" ]; then \
|
data/vendor/liburing/README
CHANGED
|
@@ -16,6 +16,15 @@ and development for both kernel and userspace. The list is archived here:
|
|
|
16
16
|
https://lore.kernel.org/io-uring/
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
kernel version dependency
|
|
20
|
+
--------------------------
|
|
21
|
+
|
|
22
|
+
liburing itself is not tied to any specific kernel release, and hence it's
|
|
23
|
+
possible to use the newest liburing release even on older kernels (and vice
|
|
24
|
+
versa). Newer features may only be available on more recent kernels,
|
|
25
|
+
obviously.
|
|
26
|
+
|
|
27
|
+
|
|
19
28
|
ulimit settings
|
|
20
29
|
---------------
|
|
21
30
|
|
|
@@ -26,7 +35,9 @@ it quickly. root isn't under this restriction, but regular users are. Going
|
|
|
26
35
|
into detail on how to bump the limit on various systems is beyond the scope
|
|
27
36
|
of this little blurb, but check /etc/security/limits.conf for user specific
|
|
28
37
|
settings, or /etc/systemd/user.conf and /etc/systemd/system.conf for systemd
|
|
29
|
-
setups.
|
|
38
|
+
setups. This affects 5.11 and earlier, new kernels are less dependent
|
|
39
|
+
on RLIMIT_MEMLOCK as it is only used for registering buffers.
|
|
40
|
+
|
|
30
41
|
|
|
31
42
|
Regressions tests
|
|
32
43
|
-----------------
|
|
@@ -35,6 +46,7 @@ The bulk of liburing is actually regression/unit tests for both liburing and
|
|
|
35
46
|
the kernel io_uring support. Please note that this suite isn't expected to
|
|
36
47
|
pass on older kernels, and may even crash or hang older kernels!
|
|
37
48
|
|
|
49
|
+
|
|
38
50
|
License
|
|
39
51
|
-------
|
|
40
52
|
|
|
@@ -43,4 +55,4 @@ COPYING and LICENSE, except for a header coming from the kernel which is
|
|
|
43
55
|
dual licensed GPL with a Linux-syscall-note exception and MIT, see
|
|
44
56
|
COPYING.GPL and <https://spdx.org/licenses/Linux-syscall-note.html>.
|
|
45
57
|
|
|
46
|
-
Jens Axboe
|
|
58
|
+
Jens Axboe 2022-05-19
|
data/vendor/liburing/configure
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
+
set -e
|
|
4
|
+
|
|
3
5
|
cc=${CC:-gcc}
|
|
4
6
|
cxx=${CXX:-g++}
|
|
5
7
|
|
|
6
8
|
for opt do
|
|
7
|
-
optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)')
|
|
9
|
+
optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)' || true)
|
|
8
10
|
case "$opt" in
|
|
9
11
|
--help|-h) show_help=yes
|
|
10
12
|
;;
|
|
@@ -298,7 +300,6 @@ cat > $TMPC << EOF
|
|
|
298
300
|
#include <unistd.h>
|
|
299
301
|
#include <fcntl.h>
|
|
300
302
|
#include <string.h>
|
|
301
|
-
#include <linux/stat.h>
|
|
302
303
|
int main(int argc, char **argv)
|
|
303
304
|
{
|
|
304
305
|
struct statx x;
|
|
@@ -319,7 +320,7 @@ cat > $TMPC << EOF
|
|
|
319
320
|
#include <unistd.h>
|
|
320
321
|
#include <fcntl.h>
|
|
321
322
|
#include <string.h>
|
|
322
|
-
#include <
|
|
323
|
+
#include <sys/stat.h>
|
|
323
324
|
int main(int argc, char **argv)
|
|
324
325
|
{
|
|
325
326
|
struct statx x;
|
|
@@ -367,21 +368,21 @@ fi
|
|
|
367
368
|
print_config "has_ucontext" "$has_ucontext"
|
|
368
369
|
|
|
369
370
|
##########################################
|
|
370
|
-
#
|
|
371
|
-
|
|
371
|
+
# Check NVME_URING_CMD support
|
|
372
|
+
nvme_uring_cmd="no"
|
|
372
373
|
cat > $TMPC << EOF
|
|
373
|
-
#include <
|
|
374
|
-
int main(
|
|
374
|
+
#include <linux/nvme_ioctl.h>
|
|
375
|
+
int main(void)
|
|
375
376
|
{
|
|
376
|
-
|
|
377
|
-
|
|
377
|
+
struct nvme_uring_cmd *cmd;
|
|
378
|
+
|
|
379
|
+
return sizeof(struct nvme_uring_cmd);
|
|
378
380
|
}
|
|
379
381
|
EOF
|
|
380
|
-
if compile_prog "
|
|
381
|
-
|
|
382
|
+
if compile_prog "" "" "nvme uring cmd"; then
|
|
383
|
+
nvme_uring_cmd="yes"
|
|
382
384
|
fi
|
|
383
|
-
print_config "
|
|
384
|
-
|
|
385
|
+
print_config "NVMe uring command support" "$nvme_uring_cmd"
|
|
385
386
|
|
|
386
387
|
#############################################################################
|
|
387
388
|
if test "$liburing_nolibc" = "yes"; then
|
|
@@ -418,8 +419,8 @@ fi
|
|
|
418
419
|
if test "$array_bounds" = "yes"; then
|
|
419
420
|
output_sym "CONFIG_HAVE_ARRAY_BOUNDS"
|
|
420
421
|
fi
|
|
421
|
-
if test "$
|
|
422
|
-
output_sym "
|
|
422
|
+
if test "$nvme_uring_cmd" = "yes"; then
|
|
423
|
+
output_sym "CONFIG_HAVE_NVME_URING"
|
|
423
424
|
fi
|
|
424
425
|
|
|
425
426
|
echo "CC=$cc" >> $config_host_mak
|