1 # io_uring prototypes
2
3 ## 1. Poller implementation
4
5 Simple Poller implementation that uses `IORING_OP_POLL_ADD` to poll a file descriptor.
6 Selected when run with `-Djdk.io_uring=true`.
7
8 Functional, and suited to pollerMode=3 (`io_uring` instance per carrier thread),
9 but will not perform as well as the `epoll` based Poller. Batching of submits, to
10 reduce calls to `io_uring_enter`, was prototyped but the batching added latency
11 and reduced performance overall.
12
13
14 ## 2. Poller implementation with submission queue polling
15
16 Builds on prototype 1 but uses `IORING_SETUP_SQPOLL` to use a kernel thread to poll the
17 submission queue. Enabled with `-Djdk.io_uring.sqpoll_idle=<N>` where N is the duration
18 (in milliseconds) for the kernel thread to spin before sleeping.
19
20 For the majority case where the thread is still running, this is only a cheap memory access.
21 The default value for this parameter is zero, which means submission queue polling is not
22 enabled.
23
24 ## 3. Blocking read/write implemented on async read/write
25
26 Extends Poller implementation to support read and write operations using `IORING_OP_READ`
27 and `IORING_OP_WRITE`.
28
29 Enable for `java.net.Socket` read/write with `-Djdk.io_uring.read=true` and
30 `-Djdk.io_uring.write=true`.
31
32 ## 4. Blocking read/write implemented on async readv/writev with registered buffers
33
34 (not in loom repo at this time)
35
36 Uses `IORING_OP_READ_FIXED` and `IORING_OP_WRITE_FIXED` with buffers that are
37 registered with kernel.