uringmachine 0.19.1 → 0.20.0
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/CHANGELOG.md +12 -1
- data/TODO.md +0 -1
- data/examples/bm_fileno.rb +33 -0
- data/examples/bm_mutex.rb +85 -0
- data/examples/bm_mutex_single.rb +33 -0
- data/examples/bm_queue.rb +27 -28
- data/examples/bm_send.rb +2 -5
- data/examples/bm_snooze.rb +20 -42
- data/examples/fiber_scheduler_demo.rb +15 -51
- data/examples/fiber_scheduler_fork.rb +24 -0
- data/examples/nc_ssl.rb +71 -0
- data/ext/um/extconf.rb +5 -15
- data/ext/um/um.c +57 -41
- data/ext/um/um.h +21 -11
- data/ext/um/um_async_op_class.c +2 -2
- data/ext/um/um_buffer.c +1 -1
- data/ext/um/um_class.c +94 -23
- data/ext/um/um_const.c +51 -3
- data/ext/um/um_mutex_class.c +1 -1
- data/ext/um/um_queue_class.c +1 -1
- data/ext/um/um_stream.c +5 -5
- data/ext/um/um_stream_class.c +3 -0
- data/ext/um/um_sync.c +22 -27
- data/ext/um/um_utils.c +59 -19
- data/grant-2025/journal.md +229 -0
- data/grant-2025/tasks.md +66 -0
- data/lib/uringmachine/fiber_scheduler.rb +180 -48
- data/lib/uringmachine/version.rb +1 -1
- data/lib/uringmachine.rb +6 -0
- data/test/test_fiber_scheduler.rb +138 -0
- data/test/test_stream.rb +2 -2
- data/test/test_um.rb +427 -34
- data/vendor/liburing/.github/workflows/ci.yml +94 -1
- data/vendor/liburing/.github/workflows/test_build.c +9 -0
- data/vendor/liburing/configure +27 -0
- data/vendor/liburing/examples/Makefile +6 -0
- data/vendor/liburing/examples/helpers.c +8 -0
- data/vendor/liburing/examples/helpers.h +5 -0
- data/vendor/liburing/liburing.spec +1 -1
- data/vendor/liburing/src/Makefile +9 -3
- data/vendor/liburing/src/include/liburing/barrier.h +11 -5
- data/vendor/liburing/src/include/liburing/io_uring/query.h +41 -0
- data/vendor/liburing/src/include/liburing/io_uring.h +50 -0
- data/vendor/liburing/src/include/liburing/sanitize.h +16 -4
- data/vendor/liburing/src/include/liburing.h +445 -121
- data/vendor/liburing/src/liburing-ffi.map +15 -0
- data/vendor/liburing/src/liburing.map +8 -0
- data/vendor/liburing/src/sanitize.c +4 -1
- data/vendor/liburing/src/setup.c +7 -4
- data/vendor/liburing/test/232c93d07b74.c +4 -16
- data/vendor/liburing/test/Makefile +15 -1
- data/vendor/liburing/test/accept.c +2 -13
- data/vendor/liburing/test/conn-unreach.c +132 -0
- data/vendor/liburing/test/fd-pass.c +32 -7
- data/vendor/liburing/test/fdinfo.c +39 -12
- data/vendor/liburing/test/fifo-futex-poll.c +114 -0
- data/vendor/liburing/test/fifo-nonblock-read.c +1 -12
- data/vendor/liburing/test/futex.c +1 -1
- data/vendor/liburing/test/helpers.c +99 -2
- data/vendor/liburing/test/helpers.h +9 -0
- data/vendor/liburing/test/io_uring_passthrough.c +6 -12
- data/vendor/liburing/test/mock_file.c +379 -0
- data/vendor/liburing/test/mock_file.h +47 -0
- data/vendor/liburing/test/nop.c +2 -2
- data/vendor/liburing/test/nop32-overflow.c +150 -0
- data/vendor/liburing/test/nop32.c +126 -0
- data/vendor/liburing/test/pipe.c +166 -0
- data/vendor/liburing/test/poll-race-mshot.c +13 -1
- data/vendor/liburing/test/recv-mshot-fair.c +81 -34
- data/vendor/liburing/test/recvsend_bundle.c +1 -1
- data/vendor/liburing/test/resize-rings.c +2 -0
- data/vendor/liburing/test/ring-query.c +322 -0
- data/vendor/liburing/test/ringbuf-loop.c +87 -0
- data/vendor/liburing/test/runtests.sh +2 -2
- data/vendor/liburing/test/send-zerocopy.c +43 -5
- data/vendor/liburing/test/send_recv.c +102 -32
- data/vendor/liburing/test/shutdown.c +2 -12
- data/vendor/liburing/test/socket-nb.c +3 -14
- data/vendor/liburing/test/socket-rw-eagain.c +2 -12
- data/vendor/liburing/test/socket-rw-offset.c +2 -12
- data/vendor/liburing/test/socket-rw.c +2 -12
- data/vendor/liburing/test/sqe-mixed-bad-wrap.c +87 -0
- data/vendor/liburing/test/sqe-mixed-nop.c +82 -0
- data/vendor/liburing/test/sqe-mixed-uring_cmd.c +153 -0
- data/vendor/liburing/test/timestamp.c +56 -19
- data/vendor/liburing/test/vec-regbuf.c +2 -4
- data/vendor/liburing/test/wq-aff.c +7 -0
- metadata +24 -2
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/* SPDX-License-Identifier: MIT */
|
|
2
|
+
/*
|
|
3
|
+
* Description: mixed sqes utilizing basic nop and io_uring passthrough commands
|
|
4
|
+
*/
|
|
5
|
+
#include <errno.h>
|
|
6
|
+
#include <stdio.h>
|
|
7
|
+
#include <unistd.h>
|
|
8
|
+
#include <string.h>
|
|
9
|
+
#include <sys/stat.h>
|
|
10
|
+
|
|
11
|
+
#include "helpers.h"
|
|
12
|
+
#include "liburing.h"
|
|
13
|
+
#include "nvme.h"
|
|
14
|
+
|
|
15
|
+
#define len 0x1000
|
|
16
|
+
static unsigned char buf[len];
|
|
17
|
+
static int seq;
|
|
18
|
+
|
|
19
|
+
static int test_single_nop(struct io_uring *ring)
|
|
20
|
+
{
|
|
21
|
+
struct io_uring_cqe *cqe;
|
|
22
|
+
struct io_uring_sqe *sqe;
|
|
23
|
+
int ret;
|
|
24
|
+
|
|
25
|
+
sqe = io_uring_get_sqe(ring);
|
|
26
|
+
if (!sqe) {
|
|
27
|
+
fprintf(stderr, "get sqe failed\n");
|
|
28
|
+
return T_EXIT_FAIL;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
io_uring_prep_nop(sqe);
|
|
32
|
+
sqe->user_data = ++seq;
|
|
33
|
+
|
|
34
|
+
ret = io_uring_submit(ring);
|
|
35
|
+
if (ret <= 0) {
|
|
36
|
+
fprintf(stderr, "sqe submit failed: %d\n", ret);
|
|
37
|
+
return T_EXIT_FAIL;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
ret = io_uring_wait_cqe(ring, &cqe);
|
|
41
|
+
if (ret < 0) {
|
|
42
|
+
fprintf(stderr, "wait completion %d\n", ret);
|
|
43
|
+
} else if (cqe->user_data != seq) {
|
|
44
|
+
fprintf(stderr, "Unexpected user_data: %ld\n", (long) cqe->user_data);
|
|
45
|
+
} else {
|
|
46
|
+
io_uring_cqe_seen(ring, cqe);
|
|
47
|
+
return T_EXIT_PASS;
|
|
48
|
+
}
|
|
49
|
+
return T_EXIT_FAIL;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static int test_single_nvme_read(struct io_uring *ring, int fd)
|
|
53
|
+
{
|
|
54
|
+
struct nvme_uring_cmd *cmd;
|
|
55
|
+
struct io_uring_cqe *cqe;
|
|
56
|
+
struct io_uring_sqe *sqe;
|
|
57
|
+
int ret;
|
|
58
|
+
|
|
59
|
+
sqe = io_uring_get_sqe128(ring);
|
|
60
|
+
if (!sqe) {
|
|
61
|
+
fprintf(stderr, "get sqe failed\n");
|
|
62
|
+
return T_EXIT_FAIL;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
io_uring_prep_uring_cmd128(sqe, NVME_URING_CMD_IO, fd);
|
|
66
|
+
sqe->user_data = ++seq;
|
|
67
|
+
|
|
68
|
+
cmd = (struct nvme_uring_cmd *)sqe->cmd;
|
|
69
|
+
memset(cmd, 0, sizeof(struct nvme_uring_cmd));
|
|
70
|
+
cmd->opcode = nvme_cmd_read;
|
|
71
|
+
cmd->cdw12 = (len >> lba_shift) - 1;
|
|
72
|
+
cmd->addr = (__u64)(uintptr_t)buf;
|
|
73
|
+
cmd->data_len = len;
|
|
74
|
+
cmd->nsid = nsid;
|
|
75
|
+
|
|
76
|
+
ret = io_uring_submit(ring);
|
|
77
|
+
if (ret <= 0) {
|
|
78
|
+
fprintf(stderr, "sqe submit failed: %d\n", ret);
|
|
79
|
+
return T_EXIT_FAIL;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
ret = io_uring_wait_cqe(ring, &cqe);
|
|
83
|
+
if (ret < 0) {
|
|
84
|
+
fprintf(stderr, "wait completion %d\n", ret);
|
|
85
|
+
} else if (cqe->res != 0) {
|
|
86
|
+
fprintf(stderr, "cqe res %d, wanted 0\n", cqe->res);
|
|
87
|
+
} else if (cqe->user_data != seq) {
|
|
88
|
+
fprintf(stderr, "Unexpected user_data: %ld\n", (long) cqe->user_data);
|
|
89
|
+
} else {
|
|
90
|
+
io_uring_cqe_seen(ring, cqe);
|
|
91
|
+
return T_EXIT_PASS;
|
|
92
|
+
}
|
|
93
|
+
return T_EXIT_FAIL;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
int main(int argc, char *argv[])
|
|
97
|
+
{
|
|
98
|
+
struct io_uring ring;
|
|
99
|
+
struct stat sb;
|
|
100
|
+
int fd, ret, i;
|
|
101
|
+
|
|
102
|
+
if (argc < 2)
|
|
103
|
+
return T_EXIT_SKIP;
|
|
104
|
+
|
|
105
|
+
ret = nvme_get_info(argv[1]);
|
|
106
|
+
if (ret)
|
|
107
|
+
return T_EXIT_SKIP;
|
|
108
|
+
|
|
109
|
+
fd = open(argv[1], O_RDONLY);
|
|
110
|
+
if (fd < 0) {
|
|
111
|
+
if (errno == EACCES || errno == EPERM)
|
|
112
|
+
return T_EXIT_SKIP;
|
|
113
|
+
perror("file open");
|
|
114
|
+
return T_EXIT_FAIL;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (fstat(fd, &sb) < 0) {
|
|
118
|
+
perror("fstat");
|
|
119
|
+
ret = T_EXIT_FAIL;
|
|
120
|
+
goto close;
|
|
121
|
+
}
|
|
122
|
+
if (!S_ISCHR(sb.st_mode)) {
|
|
123
|
+
ret = T_EXIT_SKIP;
|
|
124
|
+
goto close;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
ret = io_uring_queue_init(8, &ring,
|
|
128
|
+
IORING_SETUP_CQE_MIXED | IORING_SETUP_SQE_MIXED);
|
|
129
|
+
if (ret) {
|
|
130
|
+
if (ret == -EINVAL) {
|
|
131
|
+
ret = T_EXIT_SKIP;
|
|
132
|
+
} else {
|
|
133
|
+
fprintf(stderr, "ring setup failed: %d\n", ret);
|
|
134
|
+
ret = T_EXIT_FAIL;
|
|
135
|
+
}
|
|
136
|
+
goto close;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
for (i = 0; i < 32; i++) {
|
|
140
|
+
if (i & 1)
|
|
141
|
+
ret = test_single_nvme_read(&ring, fd);
|
|
142
|
+
else
|
|
143
|
+
ret = test_single_nop(&ring);
|
|
144
|
+
|
|
145
|
+
if (ret)
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
io_uring_queue_exit(&ring);
|
|
150
|
+
close:
|
|
151
|
+
close(fd);
|
|
152
|
+
return ret;
|
|
153
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
#include <time.h>
|
|
1
2
|
#include <arpa/inet.h>
|
|
2
|
-
#include <error.h>
|
|
3
|
-
#include <errno.h>
|
|
4
3
|
#include <inttypes.h>
|
|
5
4
|
#include <linux/errqueue.h>
|
|
6
5
|
#include <linux/ipv6.h>
|
|
@@ -15,7 +14,6 @@
|
|
|
15
14
|
#include <stdlib.h>
|
|
16
15
|
#include <string.h>
|
|
17
16
|
#include <sys/socket.h>
|
|
18
|
-
#include <time.h>
|
|
19
17
|
#include <unistd.h>
|
|
20
18
|
#include <assert.h>
|
|
21
19
|
|
|
@@ -47,11 +45,14 @@ static struct sockaddr_in6 daddr6;
|
|
|
47
45
|
static int saved_tskey = -1;
|
|
48
46
|
static int saved_tskey_type = -1;
|
|
49
47
|
|
|
48
|
+
static int listen_fd;
|
|
49
|
+
|
|
50
50
|
struct ctx {
|
|
51
51
|
int family;
|
|
52
52
|
int proto;
|
|
53
53
|
int report_opt;
|
|
54
54
|
int num_pkts;
|
|
55
|
+
int cqe_mixed;
|
|
55
56
|
};
|
|
56
57
|
|
|
57
58
|
static int validate_key(int tskey, int tstype, struct ctx *ctx)
|
|
@@ -86,15 +87,15 @@ static int test_prep_sock(int family, int proto, unsigned report_opt)
|
|
|
86
87
|
|
|
87
88
|
fd = socket(family, proto, ipproto);
|
|
88
89
|
if (fd < 0)
|
|
89
|
-
|
|
90
|
+
t_error(1, errno, "socket");
|
|
90
91
|
|
|
91
92
|
if (proto == SOCK_STREAM) {
|
|
92
93
|
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY,
|
|
93
94
|
(char*) &val, sizeof(val)))
|
|
94
|
-
|
|
95
|
+
t_error(1, 0, "setsockopt no nagle");
|
|
95
96
|
|
|
96
97
|
if (connect(fd, (void *) &daddr6, sizeof(daddr6)))
|
|
97
|
-
|
|
98
|
+
t_error(1, errno, "connect ipv6");
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
sock_opt = SOF_TIMESTAMPING_SOFTWARE |
|
|
@@ -105,7 +106,7 @@ static int test_prep_sock(int family, int proto, unsigned report_opt)
|
|
|
105
106
|
|
|
106
107
|
if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPING,
|
|
107
108
|
(char *) &sock_opt, sizeof(sock_opt)))
|
|
108
|
-
|
|
109
|
+
t_error(1, 0, "setsockopt timestamping");
|
|
109
110
|
|
|
110
111
|
return fd;
|
|
111
112
|
}
|
|
@@ -185,12 +186,18 @@ static int do_test(struct ctx *ctx)
|
|
|
185
186
|
int cqes_seen = 0;
|
|
186
187
|
int i, fd, ret;
|
|
187
188
|
int ts_expected = 0, ts_got = 0;
|
|
189
|
+
unsigned ring_flags;
|
|
188
190
|
|
|
189
191
|
ts_expected += !!(ctx->report_opt & SOF_TIMESTAMPING_TX_SCHED);
|
|
190
192
|
ts_expected += !!(ctx->report_opt & SOF_TIMESTAMPING_TX_SOFTWARE);
|
|
191
193
|
ts_expected += !!(ctx->report_opt & SOF_TIMESTAMPING_TX_ACK);
|
|
192
194
|
|
|
193
|
-
|
|
195
|
+
if (ctx->cqe_mixed)
|
|
196
|
+
ring_flags = IORING_SETUP_CQE_MIXED;
|
|
197
|
+
else
|
|
198
|
+
ring_flags = IORING_SETUP_CQE32;
|
|
199
|
+
|
|
200
|
+
ret = t_create_ring(32, &ring, ring_flags);
|
|
194
201
|
if (ret == T_SETUP_SKIP)
|
|
195
202
|
return T_EXIT_SKIP;
|
|
196
203
|
else if (ret)
|
|
@@ -242,6 +249,13 @@ static int do_test(struct ctx *ctx)
|
|
|
242
249
|
bool hwts;
|
|
243
250
|
|
|
244
251
|
cqes_seen++;
|
|
252
|
+
if (cqe->flags & IORING_CQE_F_SKIP) {
|
|
253
|
+
if (!ctx->cqe_mixed) {
|
|
254
|
+
t_error(1, 0, "SKIP set for non-mixed");
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
245
259
|
|
|
246
260
|
if (!(cqe->flags & IORING_CQE_F_MORE)) {
|
|
247
261
|
if (cqe->res == -EINVAL || cqe->res == -EOPNOTSUPP)
|
|
@@ -250,6 +264,11 @@ static int do_test(struct ctx *ctx)
|
|
|
250
264
|
t_error(1, 0, "failed cqe %i", cqe->res);
|
|
251
265
|
break;
|
|
252
266
|
}
|
|
267
|
+
if (ctx->cqe_mixed && !(cqe->flags & IORING_CQE_F_32)) {
|
|
268
|
+
t_error(1, 0, "CQE_F_32 not set");
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
cqes_seen++;
|
|
253
272
|
|
|
254
273
|
ts = (void *)(cqe + 1);
|
|
255
274
|
tstype = cqe->flags >> IORING_TIMESTAMP_TYPE_SHIFT;
|
|
@@ -291,24 +310,22 @@ static void resolve_hostname(const char *name, int port)
|
|
|
291
310
|
|
|
292
311
|
static void do_listen(int family, int type, void *addr, int alen)
|
|
293
312
|
{
|
|
294
|
-
|
|
313
|
+
listen_fd = socket(family, type, 0);
|
|
314
|
+
if (listen_fd == -1)
|
|
315
|
+
t_error(1, errno, "socket rx");
|
|
295
316
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
error(1, errno, "socket rx");
|
|
317
|
+
if (bind(listen_fd, addr, alen))
|
|
318
|
+
t_error(1, errno, "bind rx");
|
|
299
319
|
|
|
300
|
-
if (
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
if (type == SOCK_STREAM && listen(fd, 10))
|
|
304
|
-
error(1, errno, "listen rx");
|
|
320
|
+
if (type == SOCK_STREAM && listen(listen_fd, 10))
|
|
321
|
+
t_error(1, errno, "listen rx");
|
|
305
322
|
|
|
306
323
|
/* leave fd open, will be closed on process exit.
|
|
307
324
|
* this enables connect() to succeed and avoids icmp replies
|
|
308
325
|
*/
|
|
309
326
|
}
|
|
310
327
|
|
|
311
|
-
static int do_main(int family, int proto)
|
|
328
|
+
static int do_main(int family, int proto, int cqe_mixed)
|
|
312
329
|
{
|
|
313
330
|
struct ctx ctx;
|
|
314
331
|
int ret;
|
|
@@ -316,6 +333,7 @@ static int do_main(int family, int proto)
|
|
|
316
333
|
ctx.num_pkts = 1;
|
|
317
334
|
ctx.family = family;
|
|
318
335
|
ctx.proto = proto;
|
|
336
|
+
ctx.cqe_mixed = cqe_mixed;
|
|
319
337
|
|
|
320
338
|
if (verbose)
|
|
321
339
|
fprintf(stderr, "test SND\n");
|
|
@@ -372,11 +390,30 @@ static int do_main(int family, int proto)
|
|
|
372
390
|
int main(int argc, char **argv)
|
|
373
391
|
{
|
|
374
392
|
const char *hostname = "::1";
|
|
393
|
+
int ret;
|
|
375
394
|
|
|
376
395
|
if (argc > 1)
|
|
377
396
|
return T_EXIT_SKIP;
|
|
378
397
|
|
|
379
398
|
resolve_hostname(hostname, dest_port);
|
|
380
399
|
do_listen(PF_INET6, SOCK_STREAM, &daddr6, sizeof(daddr6));
|
|
381
|
-
|
|
400
|
+
ret = do_main(PF_INET6, SOCK_STREAM, 0);
|
|
401
|
+
if (ret == T_EXIT_SKIP) {
|
|
402
|
+
return T_EXIT_SKIP;
|
|
403
|
+
} else if (ret != T_EXIT_PASS) {
|
|
404
|
+
fprintf(stderr, "CQE32 test failed\n");
|
|
405
|
+
return ret;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
close(listen_fd);
|
|
409
|
+
do_listen(PF_INET6, SOCK_STREAM, &daddr6, sizeof(daddr6));
|
|
410
|
+
ret = do_main(PF_INET6, SOCK_STREAM, 1);
|
|
411
|
+
if (ret == T_EXIT_SKIP) {
|
|
412
|
+
return T_EXIT_PASS;
|
|
413
|
+
} else if (ret != T_EXIT_PASS) {
|
|
414
|
+
fprintf(stderr, "CQE32 test failed\n");
|
|
415
|
+
return ret;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
return T_EXIT_PASS;
|
|
382
419
|
}
|
|
@@ -269,7 +269,7 @@ static int test_vec(struct buf_desc *bd, struct iovec *vecs, int nr_vec,
|
|
|
269
269
|
struct sockaddr_storage addr;
|
|
270
270
|
int sock_server, sock_client;
|
|
271
271
|
struct verify_data vd;
|
|
272
|
-
size_t total_len
|
|
272
|
+
size_t total_len;
|
|
273
273
|
int i, ret;
|
|
274
274
|
void *verify_res;
|
|
275
275
|
pthread_t th;
|
|
@@ -284,9 +284,7 @@ static int test_vec(struct buf_desc *bd, struct iovec *vecs, int nr_vec,
|
|
|
284
284
|
for (i = 0; i < bd->size; i++)
|
|
285
285
|
bd->buf_wr[i] = i;
|
|
286
286
|
memset(bd->buf_rd, 0, bd->size);
|
|
287
|
-
|
|
288
|
-
for (i = 0; i < nr_vec; i++)
|
|
289
|
-
total_len += vecs[i].iov_len;
|
|
287
|
+
total_len = t_iovec_data_length(vecs, nr_vec);
|
|
290
288
|
|
|
291
289
|
vd.bd = bd;
|
|
292
290
|
vd.vecs = vecs;
|
|
@@ -161,10 +161,17 @@ static int test_invalid_cpu(void)
|
|
|
161
161
|
int main(int argc, char *argv[])
|
|
162
162
|
{
|
|
163
163
|
int ret;
|
|
164
|
+
int nr_cpus;
|
|
164
165
|
|
|
165
166
|
if (argc > 1)
|
|
166
167
|
return T_EXIT_SKIP;
|
|
167
168
|
|
|
169
|
+
nr_cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
|
170
|
+
if (nr_cpus < 2) {
|
|
171
|
+
fprintf(stderr, "Requires at least 2 CPUs, found %d\n", nr_cpus);
|
|
172
|
+
return T_EXIT_SKIP;
|
|
173
|
+
}
|
|
174
|
+
|
|
168
175
|
ret = test_invalid_cpu();
|
|
169
176
|
if (ret == T_EXIT_SKIP) {
|
|
170
177
|
return T_EXIT_SKIP;
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: uringmachine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sharon Rosner
|
|
@@ -83,7 +83,10 @@ files:
|
|
|
83
83
|
- README.md
|
|
84
84
|
- Rakefile
|
|
85
85
|
- TODO.md
|
|
86
|
+
- examples/bm_fileno.rb
|
|
86
87
|
- examples/bm_http_parse.rb
|
|
88
|
+
- examples/bm_mutex.rb
|
|
89
|
+
- examples/bm_mutex_single.rb
|
|
87
90
|
- examples/bm_queue.rb
|
|
88
91
|
- examples/bm_send.rb
|
|
89
92
|
- examples/bm_side_running.rb
|
|
@@ -93,9 +96,11 @@ files:
|
|
|
93
96
|
- examples/dns_client.rb
|
|
94
97
|
- examples/echo_server.rb
|
|
95
98
|
- examples/fiber_scheduler_demo.rb
|
|
99
|
+
- examples/fiber_scheduler_fork.rb
|
|
96
100
|
- examples/http_server.rb
|
|
97
101
|
- examples/inout.rb
|
|
98
102
|
- examples/nc.rb
|
|
103
|
+
- examples/nc_ssl.rb
|
|
99
104
|
- examples/pg.rb
|
|
100
105
|
- examples/server_client.rb
|
|
101
106
|
- examples/snooze.rb
|
|
@@ -117,6 +122,8 @@ files:
|
|
|
117
122
|
- ext/um/um_stream_class.c
|
|
118
123
|
- ext/um/um_sync.c
|
|
119
124
|
- ext/um/um_utils.c
|
|
125
|
+
- grant-2025/journal.md
|
|
126
|
+
- grant-2025/tasks.md
|
|
120
127
|
- lib/uringmachine.rb
|
|
121
128
|
- lib/uringmachine/actor.rb
|
|
122
129
|
- lib/uringmachine/dns_resolver.rb
|
|
@@ -128,6 +135,7 @@ files:
|
|
|
128
135
|
- test/test_actor.rb
|
|
129
136
|
- test/test_async_op.rb
|
|
130
137
|
- test/test_fiber.rb
|
|
138
|
+
- test/test_fiber_scheduler.rb
|
|
131
139
|
- test/test_stream.rb
|
|
132
140
|
- test/test_um.rb
|
|
133
141
|
- uringmachine.gemspec
|
|
@@ -345,6 +353,7 @@ files:
|
|
|
345
353
|
- vendor/liburing/.github/actions/codespell/stopwords
|
|
346
354
|
- vendor/liburing/.github/pull_request_template.md
|
|
347
355
|
- vendor/liburing/.github/workflows/ci.yml
|
|
356
|
+
- vendor/liburing/.github/workflows/test_build.c
|
|
348
357
|
- vendor/liburing/.gitignore
|
|
349
358
|
- vendor/liburing/CHANGELOG
|
|
350
359
|
- vendor/liburing/CITATION.cff
|
|
@@ -409,6 +418,7 @@ files:
|
|
|
409
418
|
- vendor/liburing/src/include/liburing.h
|
|
410
419
|
- vendor/liburing/src/include/liburing/barrier.h
|
|
411
420
|
- vendor/liburing/src/include/liburing/io_uring.h
|
|
421
|
+
- vendor/liburing/src/include/liburing/io_uring/query.h
|
|
412
422
|
- vendor/liburing/src/include/liburing/sanitize.h
|
|
413
423
|
- vendor/liburing/src/int_flags.h
|
|
414
424
|
- vendor/liburing/src/lib.h
|
|
@@ -448,6 +458,7 @@ files:
|
|
|
448
458
|
- vendor/liburing/test/close-opath.c
|
|
449
459
|
- vendor/liburing/test/cmd-discard.c
|
|
450
460
|
- vendor/liburing/test/config
|
|
461
|
+
- vendor/liburing/test/conn-unreach.c
|
|
451
462
|
- vendor/liburing/test/connect-rep.c
|
|
452
463
|
- vendor/liburing/test/connect.c
|
|
453
464
|
- vendor/liburing/test/coredump.c
|
|
@@ -482,6 +493,7 @@ files:
|
|
|
482
493
|
- vendor/liburing/test/fd-pass.c
|
|
483
494
|
- vendor/liburing/test/fdinfo-sqpoll.c
|
|
484
495
|
- vendor/liburing/test/fdinfo.c
|
|
496
|
+
- vendor/liburing/test/fifo-futex-poll.c
|
|
485
497
|
- vendor/liburing/test/fifo-nonblock-read.c
|
|
486
498
|
- vendor/liburing/test/file-exit-unreg.c
|
|
487
499
|
- vendor/liburing/test/file-register.c
|
|
@@ -525,6 +537,8 @@ files:
|
|
|
525
537
|
- vendor/liburing/test/min-timeout-wait.c
|
|
526
538
|
- vendor/liburing/test/min-timeout.c
|
|
527
539
|
- vendor/liburing/test/mkdir.c
|
|
540
|
+
- vendor/liburing/test/mock_file.c
|
|
541
|
+
- vendor/liburing/test/mock_file.h
|
|
528
542
|
- vendor/liburing/test/msg-ring-fd.c
|
|
529
543
|
- vendor/liburing/test/msg-ring-flags.c
|
|
530
544
|
- vendor/liburing/test/msg-ring-overflow.c
|
|
@@ -536,6 +550,8 @@ files:
|
|
|
536
550
|
- vendor/liburing/test/nolibc.c
|
|
537
551
|
- vendor/liburing/test/nop-all-sizes.c
|
|
538
552
|
- vendor/liburing/test/nop.c
|
|
553
|
+
- vendor/liburing/test/nop32-overflow.c
|
|
554
|
+
- vendor/liburing/test/nop32.c
|
|
539
555
|
- vendor/liburing/test/nvme.h
|
|
540
556
|
- vendor/liburing/test/ooo-file-unreg.c
|
|
541
557
|
- vendor/liburing/test/open-close.c
|
|
@@ -546,6 +562,7 @@ files:
|
|
|
546
562
|
- vendor/liburing/test/pipe-bug.c
|
|
547
563
|
- vendor/liburing/test/pipe-eof.c
|
|
548
564
|
- vendor/liburing/test/pipe-reuse.c
|
|
565
|
+
- vendor/liburing/test/pipe.c
|
|
549
566
|
- vendor/liburing/test/poll-cancel-all.c
|
|
550
567
|
- vendor/liburing/test/poll-cancel-ton.c
|
|
551
568
|
- vendor/liburing/test/poll-cancel.c
|
|
@@ -585,6 +602,8 @@ files:
|
|
|
585
602
|
- vendor/liburing/test/resize-rings.c
|
|
586
603
|
- vendor/liburing/test/ring-leak.c
|
|
587
604
|
- vendor/liburing/test/ring-leak2.c
|
|
605
|
+
- vendor/liburing/test/ring-query.c
|
|
606
|
+
- vendor/liburing/test/ringbuf-loop.c
|
|
588
607
|
- vendor/liburing/test/ringbuf-read.c
|
|
589
608
|
- vendor/liburing/test/ringbuf-status.c
|
|
590
609
|
- vendor/liburing/test/rsrc_tags.c
|
|
@@ -617,6 +636,9 @@ files:
|
|
|
617
636
|
- vendor/liburing/test/sq-poll-kthread.c
|
|
618
637
|
- vendor/liburing/test/sq-poll-share.c
|
|
619
638
|
- vendor/liburing/test/sq-space_left.c
|
|
639
|
+
- vendor/liburing/test/sqe-mixed-bad-wrap.c
|
|
640
|
+
- vendor/liburing/test/sqe-mixed-nop.c
|
|
641
|
+
- vendor/liburing/test/sqe-mixed-uring_cmd.c
|
|
620
642
|
- vendor/liburing/test/sqpoll-disable-exit.c
|
|
621
643
|
- vendor/liburing/test/sqpoll-exec.c
|
|
622
644
|
- vendor/liburing/test/sqpoll-exit-hang.c
|
|
@@ -675,7 +697,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
675
697
|
- !ruby/object:Gem::Version
|
|
676
698
|
version: '0'
|
|
677
699
|
requirements: []
|
|
678
|
-
rubygems_version:
|
|
700
|
+
rubygems_version: 4.0.0.dev
|
|
679
701
|
specification_version: 4
|
|
680
702
|
summary: A lean, mean io_uring machine
|
|
681
703
|
test_files: []
|