Skip to content

Add io_uring support#13932

Open
Biquaternions wants to merge 2 commits into
PaperMC:mainfrom
Biquaternions:feat/io_uring
Open

Add io_uring support#13932
Biquaternions wants to merge 2 commits into
PaperMC:mainfrom
Biquaternions:feat/io_uring

Conversation

@Biquaternions

Copy link
Copy Markdown
Contributor

To complement the work done by Beanes in #13929, this PR implements io_uring transport to Paper, including its version of Unix Domain socket support.
As such, this PR depends on #13929 being merged first, as currently Minecraft seems to rely on a hacky workaround to hide a race condition while setting up compression.

I do agree that Paper might not get a huge boost from io_uring, since it won't handle as many active connections as Velocity, but Folia will most definitely get a significant improvement from this. And with this not being a region-related feature, it is more suitable have it on Paper and let Folia get it downstream.

This also relies on removing the synchronization in Connection#disconnect from the netty threads, as it will trigger Netty's deadlock prevention in the form of io.netty.util.concurrent.BlockingOperationException.
This used to be part of Paper, but was removed in 8021488, currently unsure if was intentional or not as it doesn't seem to affect the disconnection state fixes.
I'm open to discussion whether synchronizing on the netty threads is appropriate or not in this scenario, or if this should be handled differently for io_uring.

This has also been made opt-in configurable, following Velocity's:
PaperMC/Velocity@ae31233

@Biquaternions Biquaternions requested a review from a team as a code owner June 3, 2026 18:22
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

1 participant