From 3d66f551611de37b88182c64efa091298a9e7f2c Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Mon, 24 Apr 2023 22:28:44 -0700 Subject: [PATCH] kernel: improve handling of CONFIG_IO_URING Kernel setting CONFIG_IO_URING supports high-performance I/O for file access and servers, generally for more performant platforms, and adds ~45 KB to kernel sizes. The need for this on less "beefy" devices is questionable, as is the size cost considering many platforms have kernel size limits which require tricky repartitioning if outgrown. The size cost is also large relative to the ~180 KB bump expected between major OpenWRT kernel releases. No OpenWrt packages have hard dependencies on this; samba4 and mariadb can take advantage if available (+KERNEL_IO_URING:liburing) but otherwise build and work fine. Since CONFIG_IO_URING is already managed via the KERNEL_IO_URING setting in Config-kernel.in (default Y), remove it from those target configs which unconditionally enable it, and update the defaults to enable it conditionally only on more powerful 64-bit x86 and arm devices. It may still be manually enabled as needed for high-performance custom builds. Signed-off-by: Tony Ambardar --- config/Config-kernel.in | 3 ++- target/linux/airoha/config-5.15 | 1 - target/linux/bcm53xx/config-5.10 | 1 - target/linux/bcm53xx/config-5.15 | 1 - target/linux/gemini/config-5.10 | 1 - target/linux/gemini/config-5.15 | 1 - target/linux/imx/config-5.15 | 1 - target/linux/ipq40xx/config-5.15 | 1 - target/linux/mediatek/filogic/config-5.15 | 1 - target/linux/mediatek/mt7623/config-5.15 | 1 - target/linux/mediatek/mt7629/config-5.15 | 1 - target/linux/rockchip/armv8/config-5.10 | 1 - target/linux/rockchip/armv8/config-5.15 | 1 - target/linux/x86/config-5.10 | 1 - target/linux/x86/config-5.15 | 1 - 15 files changed, 2 insertions(+), 15 deletions(-) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index c7b1864235..979a44660d 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -469,7 +469,8 @@ config KERNEL_AIO config KERNEL_IO_URING bool "Compile the kernel with io_uring support" - default y if !SMALL_FLASH + depends on !SMALL_FLASH + default y if (x86_64 || aarch64) config KERNEL_FHANDLE bool "Compile the kernel with support for fhandle syscalls" diff --git a/target/linux/airoha/config-5.15 b/target/linux/airoha/config-5.15 index adc8cdfb9b..2ccdb05060 100644 --- a/target/linux/airoha/config-5.15 +++ b/target/linux/airoha/config-5.15 @@ -135,7 +135,6 @@ CONFIG_INITRAMFS_SOURCE="" # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set CONFIG_IOMMU_SUPPORT=y -CONFIG_IO_URING=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y diff --git a/target/linux/bcm53xx/config-5.10 b/target/linux/bcm53xx/config-5.10 index 9850aa9563..04b972131a 100644 --- a/target/linux/bcm53xx/config-5.10 +++ b/target/linux/bcm53xx/config-5.10 @@ -165,7 +165,6 @@ CONFIG_HW_RANDOM_BCM2835=y CONFIG_HZ_FIXED=0 CONFIG_HZ_PERIODIC=y CONFIG_INITRAMFS_SOURCE="" -CONFIG_IO_URING=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y diff --git a/target/linux/bcm53xx/config-5.15 b/target/linux/bcm53xx/config-5.15 index 3941c22b9c..a09937defa 100644 --- a/target/linux/bcm53xx/config-5.15 +++ b/target/linux/bcm53xx/config-5.15 @@ -171,7 +171,6 @@ CONFIG_HW_RANDOM_BCM2835=y CONFIG_HZ_FIXED=0 CONFIG_HZ_PERIODIC=y CONFIG_INITRAMFS_SOURCE="" -CONFIG_IO_URING=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y diff --git a/target/linux/gemini/config-5.10 b/target/linux/gemini/config-5.10 index 698dc44b49..19dc2692f2 100644 --- a/target/linux/gemini/config-5.10 +++ b/target/linux/gemini/config-5.10 @@ -216,7 +216,6 @@ CONFIG_INPUT_KEYBOARD=y # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set CONFIG_IOMMU_SUPPORT=y -CONFIG_IO_URING=y CONFIG_IPC_NS=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y diff --git a/target/linux/gemini/config-5.15 b/target/linux/gemini/config-5.15 index b3b7a7dd12..b76371fbdc 100644 --- a/target/linux/gemini/config-5.15 +++ b/target/linux/gemini/config-5.15 @@ -217,7 +217,6 @@ CONFIG_INPUT_KEYBOARD=y # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set CONFIG_IOMMU_SUPPORT=y -CONFIG_IO_URING=y CONFIG_IPC_NS=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y diff --git a/target/linux/imx/config-5.15 b/target/linux/imx/config-5.15 index 0c9b7d22b4..90b8c285fd 100644 --- a/target/linux/imx/config-5.15 +++ b/target/linux/imx/config-5.15 @@ -233,7 +233,6 @@ CONFIG_IMX_SDMA=y CONFIG_IMX_THERMAL=y # CONFIG_IMX_WEIM is not set CONFIG_INITRAMFS_SOURCE="" -CONFIG_IO_URING=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y diff --git a/target/linux/ipq40xx/config-5.15 b/target/linux/ipq40xx/config-5.15 index 88029caf76..d5bde55178 100644 --- a/target/linux/ipq40xx/config-5.15 +++ b/target/linux/ipq40xx/config-5.15 @@ -210,7 +210,6 @@ CONFIG_INITRAMFS_SOURCE="" # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set CONFIG_IOMMU_SUPPORT=y -CONFIG_IO_URING=y # CONFIG_IPQ_APSS_PLL is not set CONFIG_IPQ_GCC_4019=y # CONFIG_IPQ_GCC_6018 is not set diff --git a/target/linux/mediatek/filogic/config-5.15 b/target/linux/mediatek/filogic/config-5.15 index 41f127ea5b..96ff95be13 100644 --- a/target/linux/mediatek/filogic/config-5.15 +++ b/target/linux/mediatek/filogic/config-5.15 @@ -186,7 +186,6 @@ CONFIG_I2C_MT65XX=y CONFIG_ICPLUS_PHY=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 CONFIG_INITRAMFS_SOURCE="" -CONFIG_IO_URING=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y diff --git a/target/linux/mediatek/mt7623/config-5.15 b/target/linux/mediatek/mt7623/config-5.15 index fa99dd50bb..2d3523d762 100644 --- a/target/linux/mediatek/mt7623/config-5.15 +++ b/target/linux/mediatek/mt7623/config-5.15 @@ -281,7 +281,6 @@ CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y # CONFIG_IOMMU_IO_PGTABLE_ARMV7S_SELFTEST is not set # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set CONFIG_IOMMU_SUPPORT=y -CONFIG_IO_URING=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y diff --git a/target/linux/mediatek/mt7629/config-5.15 b/target/linux/mediatek/mt7629/config-5.15 index 46104ece48..03fad40cca 100644 --- a/target/linux/mediatek/mt7629/config-5.15 +++ b/target/linux/mediatek/mt7629/config-5.15 @@ -142,7 +142,6 @@ CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_MTK=y CONFIG_HZ_FIXED=0 CONFIG_INITRAMFS_SOURCE="" -CONFIG_IO_URING=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y diff --git a/target/linux/rockchip/armv8/config-5.10 b/target/linux/rockchip/armv8/config-5.10 index 2d250219a8..637c54be6f 100644 --- a/target/linux/rockchip/armv8/config-5.10 +++ b/target/linux/rockchip/armv8/config-5.10 @@ -287,7 +287,6 @@ CONFIG_IOMMU_IO_PGTABLE_LPAE=y # CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set CONFIG_IOMMU_SUPPORT=y # CONFIG_IO_STRICT_DEVMEM is not set -CONFIG_IO_URING=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y diff --git a/target/linux/rockchip/armv8/config-5.15 b/target/linux/rockchip/armv8/config-5.15 index bb7f44a2c4..51a14055f3 100644 --- a/target/linux/rockchip/armv8/config-5.15 +++ b/target/linux/rockchip/armv8/config-5.15 @@ -287,7 +287,6 @@ CONFIG_IOMMU_IO_PGTABLE_LPAE=y # CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set CONFIG_IOMMU_SUPPORT=y # CONFIG_IO_STRICT_DEVMEM is not set -CONFIG_IO_URING=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y diff --git a/target/linux/x86/config-5.10 b/target/linux/x86/config-5.10 index 6868dec18a..4616fcba07 100644 --- a/target/linux/x86/config-5.10 +++ b/target/linux/x86/config-5.10 @@ -181,7 +181,6 @@ CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_0XED is not set # CONFIG_IO_DELAY_NONE is not set # CONFIG_IO_DELAY_UDELAY is not set -CONFIG_IO_URING=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y diff --git a/target/linux/x86/config-5.15 b/target/linux/x86/config-5.15 index a3d8db26ae..ee7ab9d6de 100644 --- a/target/linux/x86/config-5.15 +++ b/target/linux/x86/config-5.15 @@ -183,7 +183,6 @@ CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_0XED is not set # CONFIG_IO_DELAY_NONE is not set # CONFIG_IO_DELAY_UDELAY is not set -CONFIG_IO_URING=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y