Remove io_uring support
This commit is contained in:
@@ -1,77 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: MrHua269 <novau233@163.com>
|
|
||||||
Date: Wed, 7 Feb 2024 07:41:47 +0000
|
|
||||||
Subject: [PATCH] Io_uring channel type support
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
||||||
index 247598b6c73aca3743f4b16b47520f8ba16b2ed0..546c5ad9de8fb8bae23220547c74005f087c6597 100644
|
|
||||||
--- a/build.gradle.kts
|
|
||||||
+++ b/build.gradle.kts
|
|
||||||
@@ -35,6 +35,7 @@ dependencies {
|
|
||||||
log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins
|
|
||||||
runtimeOnly(log4jPlugins.output)
|
|
||||||
alsoShade(log4jPlugins.output)
|
|
||||||
+ implementation("io.netty.incubator:netty-incubator-transport-native-io_uring:0.0.21.Final:linux-x86_64") //Luminol - io_uring Libraries
|
|
||||||
implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol
|
|
||||||
// Paper end
|
|
||||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
|
||||||
diff --git a/src/main/java/me/earthme/luminol/config/modules/misc/IOUringSupportConfig.java b/src/main/java/me/earthme/luminol/config/modules/misc/IOUringSupportConfig.java
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000000000000000000000000000000000..f3090b6e11d82d02528c7afd358ef4db61707092
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/main/java/me/earthme/luminol/config/modules/misc/IOUringSupportConfig.java
|
|
||||||
@@ -0,0 +1,22 @@
|
|
||||||
+package me.earthme.luminol.config.modules.misc;
|
|
||||||
+
|
|
||||||
+import me.earthme.luminol.config.ConfigInfo;
|
|
||||||
+import me.earthme.luminol.config.EnumConfigCategory;
|
|
||||||
+import me.earthme.luminol.config.HotReloadUnsupported;
|
|
||||||
+import me.earthme.luminol.config.IConfigModule;
|
|
||||||
+
|
|
||||||
+public class IOUringSupportConfig implements IConfigModule {
|
|
||||||
+ @HotReloadUnsupported
|
|
||||||
+ @ConfigInfo(baseName = "enabled")
|
|
||||||
+ public static boolean enabled = false;
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public EnumConfigCategory getCategory() {
|
|
||||||
+ return EnumConfigCategory.MISC;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public String getBaseName() {
|
|
||||||
+ return "io_uring_support";
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
|
||||||
index 6e95017f4c36208abdf344e3b7d55efe2d5b4e10..bf87a55d78155ea5c303ec28d6a0154e80d7fce3 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
|
||||||
@@ -73,6 +73,10 @@ public class ServerConnectionListener {
|
|
||||||
}
|
|
||||||
// Paper end - prevent blocking on adding a new connection while the server is ticking
|
|
||||||
|
|
||||||
+ //Luminol start - io_uring support
|
|
||||||
+ public static final Supplier<io.netty.incubator.channel.uring.IOUringEventLoopGroup> SERVER_IO_URING_WORKER_GROUP = Suppliers.memoize(() -> new io.netty.incubator.channel.uring.IOUringEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty IO_URING Server IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()));
|
|
||||||
+ //Luminol end
|
|
||||||
+
|
|
||||||
public ServerConnectionListener(MinecraftServer server) {
|
|
||||||
this.server = server;
|
|
||||||
this.running = true;
|
|
||||||
@@ -90,7 +94,14 @@ public class ServerConnectionListener {
|
|
||||||
Class oclass;
|
|
||||||
EventLoopGroup eventloopgroup;
|
|
||||||
|
|
||||||
- if (Epoll.isAvailable() && this.server.isEpollEnabled()) {
|
|
||||||
+ //Luminol start - io_uring support
|
|
||||||
+ if (io.netty.incubator.channel.uring.IOUring.isAvailable() && me.earthme.luminol.config.modules.misc.IOUringSupportConfig.enabled){
|
|
||||||
+ eventloopgroup = SERVER_IO_URING_WORKER_GROUP.get();
|
|
||||||
+ oclass = io.netty.incubator.channel.uring.IOUringServerSocketChannel.class;
|
|
||||||
+ ServerConnectionListener.LOGGER.info("Using io_uring channel type");
|
|
||||||
+ }
|
|
||||||
+ else if (Epoll.isAvailable() && this.server.isEpollEnabled()) {
|
|
||||||
+ //Luminol end
|
|
||||||
// Paper start - Unix domain socket support
|
|
||||||
if (address instanceof io.netty.channel.unix.DomainSocketAddress) {
|
|
||||||
oclass = io.netty.channel.epoll.EpollServerDomainSocketChannel.class;
|
|
||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Kaiiju linear region format and settings
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 546c5ad9de8fb8bae23220547c74005f087c6597..ff14a65d284448f3eea15ee4c38e73ed61004a97 100644
|
index 247598b6c73aca3743f4b16b47520f8ba16b2ed0..dd0a3477d69ab8f59f00ae930e983b57eaf322e2 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -20,6 +20,10 @@ dependencies {
|
@@ -20,6 +20,10 @@ dependencies {
|
||||||
Reference in New Issue
Block a user