polyphony 1.0 → 1.0.2
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/.yardopts +1 -0
- data/CHANGELOG.md +16 -3
- data/README.md +1 -0
- data/TODO.md +5 -13
- data/docs/cheat-sheet.md +248 -0
- data/docs/design-principles.md +59 -3
- data/docs/faq.md +15 -32
- data/docs/fiber-scheduling.md +14 -12
- data/docs/overview.md +140 -35
- data/docs/readme.md +4 -3
- data/docs/tutorial.md +19 -149
- data/examples/core/debug.rb +12 -0
- data/examples/core/rpc_benchmark.rb +136 -0
- data/ext/polyphony/polyphony.c +2 -1
- data/lib/polyphony/extensions/fiber.rb +1 -0
- data/lib/polyphony/extensions/io.rb +171 -161
- data/lib/polyphony/extensions/pipe.rb +3 -5
- data/lib/polyphony/extensions/socket.rb +45 -54
- data/lib/polyphony/version.rb +1 -1
- data/polyphony.gemspec +3 -1
- data/test/test_socket.rb +1 -1
- metadata +33 -149
- data/vendor/liburing/man/IO_URING_CHECK_VERSION.3 +0 -1
- data/vendor/liburing/man/IO_URING_VERSION_MAJOR.3 +0 -1
- data/vendor/liburing/man/IO_URING_VERSION_MINOR.3 +0 -1
- data/vendor/liburing/man/io_uring.7 +0 -781
- data/vendor/liburing/man/io_uring_buf_ring_add.3 +0 -53
- data/vendor/liburing/man/io_uring_buf_ring_advance.3 +0 -31
- data/vendor/liburing/man/io_uring_buf_ring_cq_advance.3 +0 -41
- data/vendor/liburing/man/io_uring_buf_ring_init.3 +0 -30
- data/vendor/liburing/man/io_uring_buf_ring_mask.3 +0 -27
- data/vendor/liburing/man/io_uring_check_version.3 +0 -72
- data/vendor/liburing/man/io_uring_close_ring_fd.3 +0 -43
- data/vendor/liburing/man/io_uring_cq_advance.3 +0 -49
- data/vendor/liburing/man/io_uring_cq_has_overflow.3 +0 -25
- data/vendor/liburing/man/io_uring_cq_ready.3 +0 -26
- data/vendor/liburing/man/io_uring_cqe_get_data.3 +0 -53
- data/vendor/liburing/man/io_uring_cqe_get_data64.3 +0 -1
- data/vendor/liburing/man/io_uring_cqe_seen.3 +0 -42
- data/vendor/liburing/man/io_uring_enter.2 +0 -1700
- data/vendor/liburing/man/io_uring_enter2.2 +0 -1
- data/vendor/liburing/man/io_uring_free_probe.3 +0 -27
- data/vendor/liburing/man/io_uring_get_events.3 +0 -33
- data/vendor/liburing/man/io_uring_get_probe.3 +0 -30
- data/vendor/liburing/man/io_uring_get_sqe.3 +0 -57
- data/vendor/liburing/man/io_uring_major_version.3 +0 -1
- data/vendor/liburing/man/io_uring_minor_version.3 +0 -1
- data/vendor/liburing/man/io_uring_opcode_supported.3 +0 -30
- data/vendor/liburing/man/io_uring_peek_cqe.3 +0 -38
- data/vendor/liburing/man/io_uring_prep_accept.3 +0 -197
- data/vendor/liburing/man/io_uring_prep_accept_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_cancel.3 +0 -118
- data/vendor/liburing/man/io_uring_prep_cancel64.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_close.3 +0 -59
- data/vendor/liburing/man/io_uring_prep_close_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_connect.3 +0 -66
- data/vendor/liburing/man/io_uring_prep_fadvise.3 +0 -59
- data/vendor/liburing/man/io_uring_prep_fallocate.3 +0 -59
- data/vendor/liburing/man/io_uring_prep_fgetxattr.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_files_update.3 +0 -92
- data/vendor/liburing/man/io_uring_prep_fsetxattr.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_fsync.3 +0 -70
- data/vendor/liburing/man/io_uring_prep_getxattr.3 +0 -61
- data/vendor/liburing/man/io_uring_prep_link.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_link_timeout.3 +0 -94
- data/vendor/liburing/man/io_uring_prep_linkat.3 +0 -91
- data/vendor/liburing/man/io_uring_prep_madvise.3 +0 -56
- data/vendor/liburing/man/io_uring_prep_mkdir.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_mkdirat.3 +0 -83
- data/vendor/liburing/man/io_uring_prep_msg_ring.3 +0 -92
- data/vendor/liburing/man/io_uring_prep_msg_ring_cqe_flags.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_multishot_accept.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_multishot_accept_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_nop.3 +0 -28
- data/vendor/liburing/man/io_uring_prep_openat.3 +0 -117
- data/vendor/liburing/man/io_uring_prep_openat2.3 +0 -117
- data/vendor/liburing/man/io_uring_prep_openat2_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_openat_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_poll_add.3 +0 -72
- data/vendor/liburing/man/io_uring_prep_poll_multishot.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_poll_remove.3 +0 -55
- data/vendor/liburing/man/io_uring_prep_poll_update.3 +0 -89
- data/vendor/liburing/man/io_uring_prep_provide_buffers.3 +0 -140
- data/vendor/liburing/man/io_uring_prep_read.3 +0 -69
- data/vendor/liburing/man/io_uring_prep_read_fixed.3 +0 -72
- data/vendor/liburing/man/io_uring_prep_readv.3 +0 -85
- data/vendor/liburing/man/io_uring_prep_readv2.3 +0 -111
- data/vendor/liburing/man/io_uring_prep_recv.3 +0 -105
- data/vendor/liburing/man/io_uring_prep_recv_multishot.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_recvmsg.3 +0 -124
- data/vendor/liburing/man/io_uring_prep_recvmsg_multishot.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_remove_buffers.3 +0 -52
- data/vendor/liburing/man/io_uring_prep_rename.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_renameat.3 +0 -96
- data/vendor/liburing/man/io_uring_prep_send.3 +0 -66
- data/vendor/liburing/man/io_uring_prep_send_set_addr.3 +0 -38
- data/vendor/liburing/man/io_uring_prep_send_zc.3 +0 -96
- data/vendor/liburing/man/io_uring_prep_send_zc_fixed.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_sendmsg.3 +0 -89
- data/vendor/liburing/man/io_uring_prep_sendmsg_zc.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_setxattr.3 +0 -64
- data/vendor/liburing/man/io_uring_prep_shutdown.3 +0 -53
- data/vendor/liburing/man/io_uring_prep_socket.3 +0 -118
- data/vendor/liburing/man/io_uring_prep_socket_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_socket_direct_alloc.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_splice.3 +0 -120
- data/vendor/liburing/man/io_uring_prep_statx.3 +0 -74
- data/vendor/liburing/man/io_uring_prep_symlink.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_symlinkat.3 +0 -85
- data/vendor/liburing/man/io_uring_prep_sync_file_range.3 +0 -59
- data/vendor/liburing/man/io_uring_prep_tee.3 +0 -74
- data/vendor/liburing/man/io_uring_prep_timeout.3 +0 -95
- data/vendor/liburing/man/io_uring_prep_timeout_remove.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_timeout_update.3 +0 -98
- data/vendor/liburing/man/io_uring_prep_unlink.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_unlinkat.3 +0 -82
- data/vendor/liburing/man/io_uring_prep_write.3 +0 -67
- data/vendor/liburing/man/io_uring_prep_write_fixed.3 +0 -72
- data/vendor/liburing/man/io_uring_prep_writev.3 +0 -85
- data/vendor/liburing/man/io_uring_prep_writev2.3 +0 -111
- data/vendor/liburing/man/io_uring_queue_exit.3 +0 -26
- data/vendor/liburing/man/io_uring_queue_init.3 +0 -89
- data/vendor/liburing/man/io_uring_queue_init_params.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_cmsg_firsthdr.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_cmsg_nexthdr.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_name.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_out.3 +0 -82
- data/vendor/liburing/man/io_uring_recvmsg_payload.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_payload_length.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_validate.3 +0 -1
- data/vendor/liburing/man/io_uring_register.2 +0 -834
- data/vendor/liburing/man/io_uring_register_buf_ring.3 +0 -140
- data/vendor/liburing/man/io_uring_register_buffers.3 +0 -104
- data/vendor/liburing/man/io_uring_register_buffers_sparse.3 +0 -1
- data/vendor/liburing/man/io_uring_register_buffers_tags.3 +0 -1
- data/vendor/liburing/man/io_uring_register_buffers_update_tag.3 +0 -1
- data/vendor/liburing/man/io_uring_register_eventfd.3 +0 -51
- data/vendor/liburing/man/io_uring_register_eventfd_async.3 +0 -1
- data/vendor/liburing/man/io_uring_register_file_alloc_range.3 +0 -52
- data/vendor/liburing/man/io_uring_register_files.3 +0 -112
- data/vendor/liburing/man/io_uring_register_files_sparse.3 +0 -1
- data/vendor/liburing/man/io_uring_register_files_tags.3 +0 -1
- data/vendor/liburing/man/io_uring_register_files_update.3 +0 -1
- data/vendor/liburing/man/io_uring_register_files_update_tag.3 +0 -1
- data/vendor/liburing/man/io_uring_register_iowq_aff.3 +0 -61
- data/vendor/liburing/man/io_uring_register_iowq_max_workers.3 +0 -71
- data/vendor/liburing/man/io_uring_register_ring_fd.3 +0 -49
- data/vendor/liburing/man/io_uring_register_sync_cancel.3 +0 -71
- data/vendor/liburing/man/io_uring_setup.2 +0 -669
- data/vendor/liburing/man/io_uring_sq_ready.3 +0 -31
- data/vendor/liburing/man/io_uring_sq_space_left.3 +0 -25
- data/vendor/liburing/man/io_uring_sqe_set_data.3 +0 -48
- data/vendor/liburing/man/io_uring_sqe_set_data64.3 +0 -1
- data/vendor/liburing/man/io_uring_sqe_set_flags.3 +0 -87
- data/vendor/liburing/man/io_uring_sqring_wait.3 +0 -34
- data/vendor/liburing/man/io_uring_submit.3 +0 -46
- data/vendor/liburing/man/io_uring_submit_and_get_events.3 +0 -31
- data/vendor/liburing/man/io_uring_submit_and_wait.3 +0 -38
- data/vendor/liburing/man/io_uring_submit_and_wait_timeout.3 +0 -56
- data/vendor/liburing/man/io_uring_unregister_buf_ring.3 +0 -30
- data/vendor/liburing/man/io_uring_unregister_buffers.3 +0 -27
- data/vendor/liburing/man/io_uring_unregister_eventfd.3 +0 -1
- data/vendor/liburing/man/io_uring_unregister_files.3 +0 -27
- data/vendor/liburing/man/io_uring_unregister_iowq_aff.3 +0 -1
- data/vendor/liburing/man/io_uring_unregister_ring_fd.3 +0 -32
- data/vendor/liburing/man/io_uring_wait_cqe.3 +0 -40
- data/vendor/liburing/man/io_uring_wait_cqe_nr.3 +0 -43
- data/vendor/liburing/man/io_uring_wait_cqe_timeout.3 +0 -53
- data/vendor/liburing/man/io_uring_wait_cqes.3 +0 -56
@@ -1,124 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_recvmsg 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_recvmsg \- prepare a recvmsg request
|
8
|
-
.SH SYNOPSIS
|
9
|
-
.nf
|
10
|
-
.B #include <sys/types.h>
|
11
|
-
.B #include <sys/socket.h>
|
12
|
-
.B #include <liburing.h>
|
13
|
-
.PP
|
14
|
-
.BI "void io_uring_prep_recvmsg(struct io_uring_sqe *" sqe ","
|
15
|
-
.BI " int " fd ","
|
16
|
-
.BI " struct msghdr *" msg ","
|
17
|
-
.BI " unsigned " flags ");"
|
18
|
-
.PP
|
19
|
-
.BI "void io_uring_prep_recvmsg_multishot(struct io_uring_sqe *" sqe ","
|
20
|
-
.BI " int " fd ","
|
21
|
-
.BI " struct msghdr *" msg ","
|
22
|
-
.BI " unsigned " flags ");"
|
23
|
-
.fi
|
24
|
-
.SH DESCRIPTION
|
25
|
-
.PP
|
26
|
-
The
|
27
|
-
.BR io_uring_prep_recvmsg (3)
|
28
|
-
function prepares a recvmsg request. The submission queue entry
|
29
|
-
.I sqe
|
30
|
-
is setup to use the file descriptor
|
31
|
-
.I fd
|
32
|
-
to start receiving the data indicated by
|
33
|
-
.I msg
|
34
|
-
with the
|
35
|
-
.BR recvmsg (2)
|
36
|
-
defined flags in the
|
37
|
-
.I flags
|
38
|
-
argument.
|
39
|
-
|
40
|
-
This function prepares an async
|
41
|
-
.BR recvmsg (2)
|
42
|
-
request. See that man page for details on the arguments specified to this
|
43
|
-
prep helper.
|
44
|
-
|
45
|
-
The multishot version allows the application to issue a single receive request,
|
46
|
-
which repeatedly posts a CQE when data is available. It requires the
|
47
|
-
.B IOSQE_BUFFER_SELECT
|
48
|
-
flag to be set and no
|
49
|
-
.B MSG_WAITALL
|
50
|
-
flag to be set.
|
51
|
-
Therefore each CQE will take a buffer out of a provided buffer pool for receiving.
|
52
|
-
The application should check the flags of each CQE, regardless of its result.
|
53
|
-
If a posted CQE does not have the
|
54
|
-
.B IORING_CQE_F_MORE
|
55
|
-
flag set then the multishot receive will be done and the application should issue a
|
56
|
-
new request.
|
57
|
-
|
58
|
-
Unlike
|
59
|
-
.BR recvmsg (2),
|
60
|
-
multishot recvmsg will prepend a
|
61
|
-
.I struct io_uring_recvmsg_out
|
62
|
-
which describes the layout of the rest of the buffer in combination with the initial
|
63
|
-
.I struct msghdr
|
64
|
-
submitted with the request. See
|
65
|
-
.BR io_uring_recvmsg_out (3)
|
66
|
-
for more information on accessing the data.
|
67
|
-
|
68
|
-
Multishot variants are available since kernel 6.0.
|
69
|
-
|
70
|
-
After calling this function, additional io_uring internal modifier flags
|
71
|
-
may be set in the SQE
|
72
|
-
.I ioprio
|
73
|
-
field. The following flags are supported:
|
74
|
-
.TP
|
75
|
-
.B IORING_RECVSEND_POLL_FIRST
|
76
|
-
If set, io_uring will assume the socket is currently empty and attempting to
|
77
|
-
receive data will be unsuccessful. For this case, io_uring will arm internal
|
78
|
-
poll and trigger a receive of the data when the socket has data to be read.
|
79
|
-
This initial receive attempt can be wasteful for the case where the socket
|
80
|
-
is expected to be empty, setting this flag will bypass the initial receive
|
81
|
-
attempt and go straight to arming poll. If poll does indicate that data is
|
82
|
-
ready to be received, the operation will proceed.
|
83
|
-
|
84
|
-
Can be used with the CQE
|
85
|
-
.B IORING_CQE_F_SOCK_NONEMPTY
|
86
|
-
flag, which io_uring will set on CQEs after a
|
87
|
-
.BR recv (2)
|
88
|
-
or
|
89
|
-
.BR recvmsg (2)
|
90
|
-
operation. If set, the socket still had data to be read after the operation
|
91
|
-
completed. Both these flags are available since 5.19.
|
92
|
-
.P
|
93
|
-
|
94
|
-
.SH RETURN VALUE
|
95
|
-
None
|
96
|
-
.SH ERRORS
|
97
|
-
The CQE
|
98
|
-
.I res
|
99
|
-
field will contain the result of the operation. See the related man page for
|
100
|
-
details on possible values. Note that where synchronous system calls will return
|
101
|
-
.B -1
|
102
|
-
on failure and set
|
103
|
-
.I errno
|
104
|
-
to the actual error value, io_uring never uses
|
105
|
-
.IR errno .
|
106
|
-
Instead it returns the negated
|
107
|
-
.I errno
|
108
|
-
directly in the CQE
|
109
|
-
.I res
|
110
|
-
field.
|
111
|
-
.SH NOTES
|
112
|
-
As with any request that passes in data in a struct, that data must remain
|
113
|
-
valid until the request has been successfully submitted. It need not remain
|
114
|
-
valid until completion. Once a request has been submitted, the in-kernel
|
115
|
-
state is stable. Very early kernels (5.4 and earlier) required state to be
|
116
|
-
stable until the completion occurred. Applications can test for this
|
117
|
-
behavior by inspecting the
|
118
|
-
.B IORING_FEAT_SUBMIT_STABLE
|
119
|
-
flag passed back from
|
120
|
-
.BR io_uring_queue_init_params (3).
|
121
|
-
.SH SEE ALSO
|
122
|
-
.BR io_uring_get_sqe (3),
|
123
|
-
.BR io_uring_submit (3),
|
124
|
-
.BR recvmsg (2)
|
@@ -1 +0,0 @@
|
|
1
|
-
io_uring_prep_recvmsg.3
|
@@ -1,52 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_remove_buffers 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_remove_buffers \- prepare a remove buffers request
|
8
|
-
.SH SYNOPSIS
|
9
|
-
.nf
|
10
|
-
.B #include <liburing.h>
|
11
|
-
.PP
|
12
|
-
.BI "void io_uring_prep_remove_buffers(struct io_uring_sqe *" sqe ","
|
13
|
-
.BI " int " nr ","
|
14
|
-
.BI " int " bgid ");"
|
15
|
-
.fi
|
16
|
-
.SH DESCRIPTION
|
17
|
-
.PP
|
18
|
-
The
|
19
|
-
.BR io_uring_prep_remove_buffers (3)
|
20
|
-
function prepares a request for removing previously supplied buffers. The
|
21
|
-
submission queue entry
|
22
|
-
.I sqe
|
23
|
-
is setup to remove
|
24
|
-
.I nr
|
25
|
-
number of buffers from the buffer group ID indicated by
|
26
|
-
.IR bgid .
|
27
|
-
|
28
|
-
.SH RETURN VALUE
|
29
|
-
None
|
30
|
-
.SH ERRORS
|
31
|
-
These are the errors that are reported in the CQE
|
32
|
-
.I res
|
33
|
-
field. On success,
|
34
|
-
.I res
|
35
|
-
will contain the number of successfully removed buffers. On error,
|
36
|
-
the following errors can occur.
|
37
|
-
.TP
|
38
|
-
.B -ENOMEM
|
39
|
-
The kernel was unable to allocate memory for the request.
|
40
|
-
.TP
|
41
|
-
.B -EINVAL
|
42
|
-
One of the fields set in the SQE was invalid.
|
43
|
-
.TP
|
44
|
-
.B -ENOENT
|
45
|
-
No buffers exist at the specified
|
46
|
-
.I bgid
|
47
|
-
buffer group ID.
|
48
|
-
.SH SEE ALSO
|
49
|
-
.BR io_uring_get_sqe (3),
|
50
|
-
.BR io_uring_submit (3),
|
51
|
-
.BR io_uring_register (2),
|
52
|
-
.BR io_uring_prep_provide_buffers (3)
|
@@ -1 +0,0 @@
|
|
1
|
-
io_uring_prep_renameat.3
|
@@ -1,96 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_renameat 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_renameat \- prepare a renameat request
|
8
|
-
.SH SYNOPSIS
|
9
|
-
.nf
|
10
|
-
.B #include <fcntl.h>
|
11
|
-
.B #include <stdio.h>
|
12
|
-
.B #include <liburing.h>
|
13
|
-
.PP
|
14
|
-
.BI "void io_uring_prep_renameat(struct io_uring_sqe *" sqe ","
|
15
|
-
.BI " int " olddirfd ","
|
16
|
-
.BI " const char *" oldpath ","
|
17
|
-
.BI " int " newdirfd ","
|
18
|
-
.BI " const char *" newpath ","
|
19
|
-
.BI " unsigned int " flags ");"
|
20
|
-
.PP
|
21
|
-
.BI "void io_uring_prep_rename(struct io_uring_sqe *" sqe ","
|
22
|
-
.BI " const char *" oldpath ","
|
23
|
-
.BI " const char *" newpath ","
|
24
|
-
.BI " unsigned int " flags ");"
|
25
|
-
.fi
|
26
|
-
.SH DESCRIPTION
|
27
|
-
.PP
|
28
|
-
The
|
29
|
-
.BR io_uring_prep_renameat (3)
|
30
|
-
function prepares a renameat request. The submission queue entry
|
31
|
-
.I sqe
|
32
|
-
is setup to use the old directory file descriptor pointed to by
|
33
|
-
.I olddirfd
|
34
|
-
and old path pointed to by
|
35
|
-
.I oldpath
|
36
|
-
with the new directory file descriptor pointed to by
|
37
|
-
.I newdirfd
|
38
|
-
and the new path pointed to by
|
39
|
-
.I newpath
|
40
|
-
and using the specified flags in
|
41
|
-
.IR flags .
|
42
|
-
|
43
|
-
The
|
44
|
-
.BR io_uring_prep_rename (3)
|
45
|
-
function prepares a rename request. The submission queue entry
|
46
|
-
.I sqe
|
47
|
-
is setup to use the old path pointed to by
|
48
|
-
.I oldpath
|
49
|
-
with the new path pointed to by
|
50
|
-
.IR newpath ,
|
51
|
-
both relative to the current working directory and using the specified flags in
|
52
|
-
.IR flags .
|
53
|
-
|
54
|
-
These functions prepare an async
|
55
|
-
.BR renameat2 (2)
|
56
|
-
or
|
57
|
-
.BR rename (2)
|
58
|
-
request. If
|
59
|
-
.I flags
|
60
|
-
is zero, then this call is similar to the
|
61
|
-
.BR renameat (2)
|
62
|
-
system call. See those man pages for details.
|
63
|
-
|
64
|
-
.SH RETURN VALUE
|
65
|
-
None
|
66
|
-
.SH ERRORS
|
67
|
-
The CQE
|
68
|
-
.I res
|
69
|
-
field will contain the result of the operation. See the related man page for
|
70
|
-
details on possible values. Note that where synchronous system calls will return
|
71
|
-
.B -1
|
72
|
-
on failure and set
|
73
|
-
.I errno
|
74
|
-
to the actual error value, io_uring never uses
|
75
|
-
.IR errno .
|
76
|
-
Instead it returns the negated
|
77
|
-
.I errno
|
78
|
-
directly in the CQE
|
79
|
-
.I res
|
80
|
-
field.
|
81
|
-
.SH NOTES
|
82
|
-
As with any request that passes in data in a struct, that data must remain
|
83
|
-
valid until the request has been successfully submitted. It need not remain
|
84
|
-
valid until completion. Once a request has been submitted, the in-kernel
|
85
|
-
state is stable. Very early kernels (5.4 and earlier) required state to be
|
86
|
-
stable until the completion occurred. Applications can test for this
|
87
|
-
behavior by inspecting the
|
88
|
-
.B IORING_FEAT_SUBMIT_STABLE
|
89
|
-
flag passed back from
|
90
|
-
.BR io_uring_queue_init_params (3).
|
91
|
-
.SH SEE ALSO
|
92
|
-
.BR io_uring_get_sqe (3),
|
93
|
-
.BR io_uring_submit (3),
|
94
|
-
.BR renameat (2),
|
95
|
-
.BR renameat2 (2),
|
96
|
-
.BR rename (2)
|
@@ -1,66 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_send 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_send \- prepare a send request
|
8
|
-
.SH SYNOPSIS
|
9
|
-
.nf
|
10
|
-
.B #include <liburing.h>
|
11
|
-
.PP
|
12
|
-
.BI "void io_uring_prep_send(struct io_uring_sqe *" sqe ","
|
13
|
-
.BI " int " sockfd ","
|
14
|
-
.BI " const void *" buf ","
|
15
|
-
.BI " size_t " len ","
|
16
|
-
.BI " int " flags ");"
|
17
|
-
.fi
|
18
|
-
.SH DESCRIPTION
|
19
|
-
.PP
|
20
|
-
The
|
21
|
-
.BR io_uring_prep_send (3)
|
22
|
-
function prepares a send request. The submission queue entry
|
23
|
-
.I sqe
|
24
|
-
is setup to use the file descriptor
|
25
|
-
.I sockfd
|
26
|
-
to start sending the data from
|
27
|
-
.I buf
|
28
|
-
of size
|
29
|
-
.I len
|
30
|
-
bytes and with modifier flags
|
31
|
-
.IR flags .
|
32
|
-
|
33
|
-
Note that using
|
34
|
-
.B IOSQE_IO_LINK
|
35
|
-
with this request type requires the setting of
|
36
|
-
.B MSG_WAITALL
|
37
|
-
in the
|
38
|
-
.IR flags
|
39
|
-
argument, as a short send isn't a considered an error condition without
|
40
|
-
that being set.
|
41
|
-
|
42
|
-
This function prepares an async
|
43
|
-
.BR send (2)
|
44
|
-
request. See that man page for details.
|
45
|
-
|
46
|
-
.SH RETURN VALUE
|
47
|
-
None
|
48
|
-
.SH ERRORS
|
49
|
-
The CQE
|
50
|
-
.I res
|
51
|
-
field will contain the result of the operation. See the related man page for
|
52
|
-
details on possible values. Note that where synchronous system calls will return
|
53
|
-
.B -1
|
54
|
-
on failure and set
|
55
|
-
.I errno
|
56
|
-
to the actual error value, io_uring never uses
|
57
|
-
.IR errno .
|
58
|
-
Instead it returns the negated
|
59
|
-
.I errno
|
60
|
-
directly in the CQE
|
61
|
-
.I res
|
62
|
-
field.
|
63
|
-
.SH SEE ALSO
|
64
|
-
.BR io_uring_get_sqe (3),
|
65
|
-
.BR io_uring_submit (3),
|
66
|
-
.BR send (2)
|
@@ -1,38 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2023 Rutvik Patel <heyrutvik@gmail.com>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_send_set_addr 3 "January 23, 2023" "liburing-2.4" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_send_set_addr \- set address details for send requests
|
8
|
-
.SH SYNOPSIS
|
9
|
-
.nf
|
10
|
-
.B #include <liburing.h>
|
11
|
-
.PP
|
12
|
-
.BI "void io_uring_prep_send_set_addr(struct io_uring_sqe *" sqe ","
|
13
|
-
.BI " const struct sockaddr *" dest_addr ","
|
14
|
-
.BI " __u16 " addr_len ");"
|
15
|
-
.fi
|
16
|
-
.SH DESCRIPTION
|
17
|
-
.PP
|
18
|
-
The
|
19
|
-
.BR io_uring_prep_send_set_addr (3)
|
20
|
-
function sets a socket destination address specified by
|
21
|
-
.I dest_addr
|
22
|
-
and its length using
|
23
|
-
.I addr_len
|
24
|
-
parameters. It can be used once
|
25
|
-
.I sqe
|
26
|
-
is prepared using any of the
|
27
|
-
.BR send (2)
|
28
|
-
io_uring helpers. See man pages of
|
29
|
-
.BR io_uring_prep_send (3)
|
30
|
-
or
|
31
|
-
.BR io_uring_prep_send_zc (3).
|
32
|
-
.SH RETURN VALUE
|
33
|
-
None
|
34
|
-
.SH SEE ALSO
|
35
|
-
.BR io_uring_get_sqe (3),
|
36
|
-
.BR io_uring_prep_send (3),
|
37
|
-
.BR io_uring_prep_send_zc (3),
|
38
|
-
.BR send (2)
|
@@ -1,96 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_send_zc 3 "September 6, 2022" "liburing-2.3" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_send_zc \- prepare a zerocopy send request
|
8
|
-
.SH SYNOPSIS
|
9
|
-
.nf
|
10
|
-
.B #include <liburing.h>
|
11
|
-
.PP
|
12
|
-
.BI "void io_uring_prep_send_zc(struct io_uring_sqe *" sqe ","
|
13
|
-
.BI " int " sockfd ","
|
14
|
-
.BI " const void *" buf ","
|
15
|
-
.BI " size_t " len ","
|
16
|
-
.BI " int " flags ","
|
17
|
-
.BI " unsigned " zc_flags ");"
|
18
|
-
.PP
|
19
|
-
.BI "void io_uring_prep_send_zc_fixed(struct io_uring_sqe *" sqe ","
|
20
|
-
.BI " int " sockfd ","
|
21
|
-
.BI " const void *" buf ","
|
22
|
-
.BI " size_t " len ","
|
23
|
-
.BI " int " flags ","
|
24
|
-
.BI " unsigned " zc_flags ");"
|
25
|
-
.BI " unsigned " buf_index ");"
|
26
|
-
.fi
|
27
|
-
.SH DESCRIPTION
|
28
|
-
.PP
|
29
|
-
The
|
30
|
-
.BR io_uring_prep_send_zc (3)
|
31
|
-
function prepares a zerocopy send request. The submission queue entry
|
32
|
-
.I sqe
|
33
|
-
is setup to use the file descriptor
|
34
|
-
.I sockfd
|
35
|
-
to start sending the data from
|
36
|
-
.I buf
|
37
|
-
of size
|
38
|
-
.I len
|
39
|
-
bytes with send modifier flags
|
40
|
-
.I flags
|
41
|
-
and zerocopy modifier flags
|
42
|
-
.IR zc_flags .
|
43
|
-
|
44
|
-
The
|
45
|
-
.BR io_uring_prep_send_zc_fixed (3)
|
46
|
-
works just like
|
47
|
-
.BR io_uring_prep_send_zc (3)
|
48
|
-
except it requires the use of buffers that have been registered with
|
49
|
-
.BR io_uring_register_buffers (3).
|
50
|
-
The
|
51
|
-
.I buf
|
52
|
-
and
|
53
|
-
.I len
|
54
|
-
arguments must fall within a region specified by
|
55
|
-
.I buf_index
|
56
|
-
in the previously registered buffer. The buffer need not be aligned with the
|
57
|
-
start of the registered buffer.
|
58
|
-
|
59
|
-
Note that using
|
60
|
-
.B IOSQE_IO_LINK
|
61
|
-
with this request type requires the setting of
|
62
|
-
.B MSG_WAITALL
|
63
|
-
in the
|
64
|
-
.I flags
|
65
|
-
argument, as a short send isn't considered an error condition without
|
66
|
-
that being set.
|
67
|
-
|
68
|
-
These functions prepare an async zerocopy
|
69
|
-
.BR send (2)
|
70
|
-
request. See that man page for details. For details on the zerocopy nature
|
71
|
-
of it, see
|
72
|
-
.BR io_uring_enter (2) .
|
73
|
-
|
74
|
-
.SH RETURN VALUE
|
75
|
-
None
|
76
|
-
.SH ERRORS
|
77
|
-
The CQE
|
78
|
-
.I res
|
79
|
-
field will contain the result of the operation. See the related man page for
|
80
|
-
details on possible values. Note that where synchronous system calls will return
|
81
|
-
.B -1
|
82
|
-
on failure and set
|
83
|
-
.I errno
|
84
|
-
to the actual error value, io_uring never uses
|
85
|
-
.IR errno .
|
86
|
-
Instead it returns the negated
|
87
|
-
.I errno
|
88
|
-
directly in the CQE
|
89
|
-
.I res
|
90
|
-
field.
|
91
|
-
.SH SEE ALSO
|
92
|
-
.BR io_uring_get_sqe (3),
|
93
|
-
.BR io_uring_submit (3),
|
94
|
-
.BR io_uring_prep_send (3),
|
95
|
-
.BR io_uring_enter (2),
|
96
|
-
.BR send (2)
|
@@ -1 +0,0 @@
|
|
1
|
-
io_uring_prep_send_zc.3
|
@@ -1,89 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_sendmsg 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_sendmsg \- prepare a sendmsg request
|
8
|
-
.SH SYNOPSIS
|
9
|
-
.nf
|
10
|
-
.B #include <sys/types.h>
|
11
|
-
.B #include <sys/socket.h>
|
12
|
-
.B #include <liburing.h>
|
13
|
-
.PP
|
14
|
-
.BI "void io_uring_prep_sendmsg(struct io_uring_sqe *" sqe ","
|
15
|
-
.BI " int " fd ","
|
16
|
-
.BI " const struct msghdr *" msg ","
|
17
|
-
.BI " unsigned " flags ");"
|
18
|
-
.PP
|
19
|
-
.BI "void io_uring_prep_sendmsg_zc(struct io_uring_sqe *" sqe ","
|
20
|
-
.BI " int " fd ","
|
21
|
-
.BI " const struct msghdr *" msg ","
|
22
|
-
.BI " unsigned " flags ");"
|
23
|
-
.fi
|
24
|
-
.SH DESCRIPTION
|
25
|
-
.PP
|
26
|
-
The
|
27
|
-
.BR io_uring_prep_sendmsg (3)
|
28
|
-
function prepares a sendmsg request. The submission queue entry
|
29
|
-
.I sqe
|
30
|
-
is setup to use the file descriptor
|
31
|
-
.I fd
|
32
|
-
to start sending the data indicated by
|
33
|
-
.I msg
|
34
|
-
with the
|
35
|
-
.BR sendmsg (2)
|
36
|
-
defined flags in the
|
37
|
-
.I flags
|
38
|
-
argument.
|
39
|
-
|
40
|
-
The
|
41
|
-
.BR io_uring_prep_sendmsg_zc (3)
|
42
|
-
accepts the same parameters as
|
43
|
-
.BR io_uring_prep_sendmsg (3)
|
44
|
-
but prepares a zerocopy sendmsg request.
|
45
|
-
|
46
|
-
Note that using
|
47
|
-
.B IOSQE_IO_LINK
|
48
|
-
with this request type requires the setting of
|
49
|
-
.B MSG_WAITALL
|
50
|
-
in the
|
51
|
-
.I flags
|
52
|
-
argument, as a short send isn't considered an error condition without
|
53
|
-
that being set.
|
54
|
-
|
55
|
-
This function prepares an async
|
56
|
-
.BR sendmsg (2)
|
57
|
-
request. See that man page for details.
|
58
|
-
|
59
|
-
.SH RETURN VALUE
|
60
|
-
None
|
61
|
-
.SH ERRORS
|
62
|
-
The CQE
|
63
|
-
.I res
|
64
|
-
field will contain the result of the operation. See the related man page for
|
65
|
-
details on possible values. Note that where synchronous system calls will return
|
66
|
-
.B -1
|
67
|
-
on failure and set
|
68
|
-
.I errno
|
69
|
-
to the actual error value, io_uring never uses
|
70
|
-
.IR errno .
|
71
|
-
Instead it returns the negated
|
72
|
-
.I errno
|
73
|
-
directly in the CQE
|
74
|
-
.I res
|
75
|
-
field.
|
76
|
-
.SH NOTES
|
77
|
-
As with any request that passes in data in a struct, that data must remain
|
78
|
-
valid until the request has been successfully submitted. It need not remain
|
79
|
-
valid until completion. Once a request has been submitted, the in-kernel
|
80
|
-
state is stable. Very early kernels (5.4 and earlier) required state to be
|
81
|
-
stable until the completion occurred. Applications can test for this
|
82
|
-
behavior by inspecting the
|
83
|
-
.B IORING_FEAT_SUBMIT_STABLE
|
84
|
-
flag passed back from
|
85
|
-
.BR io_uring_queue_init_params (3).
|
86
|
-
.SH SEE ALSO
|
87
|
-
.BR io_uring_get_sqe (3),
|
88
|
-
.BR io_uring_submit (3),
|
89
|
-
.BR sendmsg (2)
|
@@ -1 +0,0 @@
|
|
1
|
-
io_uring_prep_sendmsg.3
|
@@ -1,64 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2023 Rutvik Patel <heyrutvik@gmail.com>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_setxattr 3 "January 23, 2023" "liburing-2.4" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_setxattr, io_uring_prep_fsetxattr \- prepare a request to set an
|
8
|
-
extended attribute value
|
9
|
-
.SH SYNOPSIS
|
10
|
-
.nf
|
11
|
-
.B #include <liburing.h>
|
12
|
-
.PP
|
13
|
-
.BI "void io_uring_prep_setxattr(struct io_uring_sqe *" sqe ","
|
14
|
-
.BI " const char *" name ","
|
15
|
-
.BI " const char *" value ","
|
16
|
-
.BI " const char *" path ","
|
17
|
-
.BI " int " flags ","
|
18
|
-
.BI " unsigned int " len ");"
|
19
|
-
.PP
|
20
|
-
.BI "void io_uring_prep_fsetxattr(struct io_uring_sqe *" sqe ","
|
21
|
-
.BI " int " fd ","
|
22
|
-
.BI " const char *" name ","
|
23
|
-
.BI " const char *" value ","
|
24
|
-
.BI " int " flags ","
|
25
|
-
.BI " unsigned int " len ");"
|
26
|
-
.fi
|
27
|
-
.SH DESCRIPTION
|
28
|
-
.PP
|
29
|
-
The
|
30
|
-
.BR io_uring_prep_setxattr (3)
|
31
|
-
function prepares a request to set an extended attribute value. The submission
|
32
|
-
queue entry
|
33
|
-
.I sqe
|
34
|
-
is setup to set the
|
35
|
-
.I value
|
36
|
-
of the extended attribute identified by
|
37
|
-
.I name
|
38
|
-
and associated with the given
|
39
|
-
.I path
|
40
|
-
in the filesystem with modifier flags
|
41
|
-
.IR flags .
|
42
|
-
The
|
43
|
-
.I len
|
44
|
-
argument specifies the size (in bytes) of
|
45
|
-
.IR value .
|
46
|
-
|
47
|
-
.BR io_uring_prep_fsetxattr (3)
|
48
|
-
is identical to
|
49
|
-
.BR io_uring_prep_setxattr (3),
|
50
|
-
only the extended attribute is set on the open file referred to by
|
51
|
-
.I fd
|
52
|
-
in place of
|
53
|
-
.IR path .
|
54
|
-
|
55
|
-
This function prepares an async
|
56
|
-
.BR setxattr (2)
|
57
|
-
request. See that man page for details.
|
58
|
-
|
59
|
-
.SH RETURN VALUE
|
60
|
-
None
|
61
|
-
|
62
|
-
.SH SEE ALSO
|
63
|
-
.BR io_uring_get_sqe (3),
|
64
|
-
.BR setxattr (2)
|
@@ -1,53 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_shutdown 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_shutdown \- prepare a shutdown request
|
8
|
-
.SH SYNOPSIS
|
9
|
-
.nf
|
10
|
-
.B #include <sys/socket.h>
|
11
|
-
.B #include <liburing.h>
|
12
|
-
.PP
|
13
|
-
.BI "void io_uring_prep_shutdown(struct io_uring_sqe *" sqe ","
|
14
|
-
.BI " int " sockfd ","
|
15
|
-
.BI " int " how ");"
|
16
|
-
.fi
|
17
|
-
.SH DESCRIPTION
|
18
|
-
.PP
|
19
|
-
The
|
20
|
-
.BR io_uring_prep_shutdown (3)
|
21
|
-
function prepares a shutdown request. The submission queue entry
|
22
|
-
.I sqe
|
23
|
-
is setup to use the file descriptor
|
24
|
-
.I sockfd
|
25
|
-
that should be shutdown with the
|
26
|
-
.I how
|
27
|
-
argument.
|
28
|
-
|
29
|
-
This function prepares an async
|
30
|
-
.BR shutdown (2)
|
31
|
-
request. See that man page for details.
|
32
|
-
|
33
|
-
.SH RETURN VALUE
|
34
|
-
None
|
35
|
-
.SH ERRORS
|
36
|
-
The CQE
|
37
|
-
.I res
|
38
|
-
field will contain the result of the operation. See the related man page for
|
39
|
-
details on possible values. Note that where synchronous system calls will return
|
40
|
-
.B -1
|
41
|
-
on failure and set
|
42
|
-
.I errno
|
43
|
-
to the actual error value, io_uring never uses
|
44
|
-
.IR errno .
|
45
|
-
Instead it returns the negated
|
46
|
-
.I errno
|
47
|
-
directly in the CQE
|
48
|
-
.I res
|
49
|
-
field.
|
50
|
-
.SH SEE ALSO
|
51
|
-
.BR io_uring_get_sqe (3),
|
52
|
-
.BR io_uring_submit (3),
|
53
|
-
.BR shutdown (2)
|