[IO] overhaul SQPOLL support
-
Review changes -
-
Download -
Patches
-
Plain diff
Two meson options control the io_uring sqpoll feature:
- io_uring_sqpoll - enable sq polling
- io_uring_shared_poller - share the polling thread between all io_urings
Since 5.12 the IORING_SETUP_ATTACH_WQ only causes sharing of poller threads not the work queues. See: https://github.com/axboe/liburing/issues/349
When using SQPOLL the userspace has no good way to know how many sqes the kernmel has consumed therefore we wait for available sqes using io_uring_sqring_wait if there was no usable sqe.
Remove the GlobalIoContext::registerLock and register all worker io_uring eventfd reads at the beginning of the completer function. Also register all the worker io_uring eventfds since they never change and it hopefully reduces overhead in the global io_uring.
When 5.15 is released with the fix failed linkchain logic path the kernel will consume the whole broken chain and we don't need to manually invalidate not submitted sqes. This allows SQPOLL to work for invalid chains.
Needs !248 (merged) and at least linux 5.15.
Merge request reports
- version 2742b50959
- version 26ce6ca8af
- version 25c7702a79
- version 24b5290d53
- version 2329bf44c5
- version 222b0b3b2f
- version 214a349651
- version 2068027e8e
- version 19db5286aa
- version 18f28a275d
- version 171c43d597
- version 16031964fa
- version 1552f67156
- version 141c5abf66
- version 130d9df2bb
- version 12ee35849b
- version 117b69607b
- version 10e0df7326
- version 96339a403
- version 8f35ecea8
- version 748caa087
- version 692c1a4d8
- version 5d3981e84
- version 4f0af39d7
- version 31503b691
- version 2ffe7af0d
- version 15f7464f9
- master (base)
- latest versionc59fb81b3 commits,
- version 2742b509593 commits,
- version 26ce6ca8af4 commits,
- version 25c7702a794 commits,
- version 24b5290d534 commits,
- version 2329bf44c53 commits,
- version 222b0b3b2f4 commits,
- version 214a3496514 commits,
- version 2068027e8e4 commits,
- version 19db5286aa3 commits,
- version 18f28a275d5 commits,
- version 171c43d5975 commits,
- version 16031964fa4 commits,
- version 1552f671567 commits,
- version 141c5abf667 commits,
- version 130d9df2bb9 commits,
- version 12ee35849b9 commits,
- version 117b69607b9 commits,
- version 10e0df732610 commits,
- version 96339a4039 commits,
- version 8f35ecea88 commits,
- version 748caa08710 commits,
- version 692c1a4d89 commits,
- version 5d3981e848 commits,
- version 4f0af39d75 commits,
- version 31503b6915 commits,
- version 2ffe7af0d2 commits,
- version 15f7464f91 commit,
- Side-by-side
- Inline