Enable the io_uring sendfile implementations.#5902
Conversation
|
Additionally, regarding advanced features supported by Netty io_uring such as BufferGroup read and sendzc, I believe users can implement them manually, for example, in the following way. |
|
@dreamlike-ocean can you rebase on latest master ? |
e71b307 to
8b93cce
Compare
done |
8b93cce to
f53dacc
Compare
|
@dreamlike-ocean can you please rebase your PR? Please note that UDS is now present in master branch |
done! please review it |
…ing IoUring splice support
…in io_uring stream channel”, it is no longer necessary to check whether the splice operation is available.
|
Due to the Netty pull request #16571 “Add generic FileRegion support in io_uring stream channel”, it is no longer necessary to check whether the splice operation is available. |
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