Enable the io_uring UDS and sendfile implementations. #5902
+75
−31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
Enable the io_uring UDS and sendfile implementations
Current Netty io_uring transport already fully provides sendfile and Unix domain socket functionality. This PR enables Vert.x support for these features.
1.
io.vertx.core.impl.transports.IoUringTransport#supportsDomainSocketswill always return true, andio.vertx.core.impl.transports.IoUringTransport#configure(io.vertx.core.net.TcpOptions, boolean, io.netty.bootstrap.ServerBootstrap)andio.vertx.core.impl.transports.IoUringTransport#configure(io.vertx.core.net.TcpOptions, boolean, io.netty.bootstrap.Bootstrap)are adjusted to support Unix domain sockets.2.
io.vertx.core.impl.transports.IoUringTransport#supportFileRegion: if the current Linux kernel supports IORING_OP_SPLICE and it is not disabled by system parameters, sendfile support is enabled.3. Due to performance issues with io_uring splice (see netty/netty#15747), support is added to forcibly disable io_uring sendfile via a system parameter.
4. Introduce UncloseableFileRegion to replace the current DefaultFileRegion in Vert.x code, preventing resource leaks caused by non-zero reference counts. fix #5743
Conformance:
I have signed the Eclipse Contributor Agreement