Archlinux Kernel based on different schedulers and some other performance improvements.
Shell archlinuxbaby-schedcachycachy-schedulercachyoscacule-schedkernellinux-kernelperformanceperformance-tuning
Add very experimental GCC LTO option for linux-cachyos-rc
Peter Jungeb00d102668e
diff --git a/linux-cachyos-rc/.SRCINFO b/linux-cachyos-rc/.SRCINFOindex 4d24f544..24dbca29 100644--- a/linux-cachyos-rc/.SRCINFO+++ b/linux-cachyos-rc/.SRCINFO@@ -29,12 +29,12 @@ pkgbase = linux-cachyos-rcsource = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.1/misc/0001-Add-latency-priority-for-CFS-class.patchsource = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.1/sched/0001-bore-cachy.patchsha256sums = 51307576df4a1651dcad4e361e6e411cfe9ed7841783c198a72ed7d89e3057c3- sha256sums = 6a78ba1cabbbac20ca5c53f8ce179053d859374342611801c232f779d6483bec+ sha256sums = 775c599894bc0b59190975835146da68dbf0c9241de7b0e3e5962e24ced42b94sha256sums = 34e2cad286f32d8c1c26e4ff18726c9e0aee151e82088bb78c3ae4fb536bf962sha256sums = e1d45b5842079a5f0f53d7ea2d66ffa3f1497766f3ccffcf13ed00f1ac67f95esha256sums = d1400a8f486ffc2362ca5ba791f7ff71f8219461c18014fb2f90bb615c41a9c5- sha256sums = ce5a95bdf23cd8d86f0494ebc813a1733eac51910b30092c4ee20542d1c21848- sha256sums = 90d3bc76d3efae6b15002cbcc0b5e812beea721b17bfab2f6781d338e02db93b+ sha256sums = 5c379c9cd2c74bca8ff92db7fedc46aab7c54289b39fba2d79b91ead89aa0a99+ sha256sums = 70874e69a9383cbdf3c033193a7d6706783fe06e3b0205208f9491ac53bb25b6pkgname = linux-cachyos-rcpkgdesc = The Linux BORE scheduler Kernel by CachyOS and with some other patches and other improvements kernel and modulesdiff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILDindex 73504373..a8756cfa 100644--- a/linux-cachyos-rc/PKGBUILD+++ b/linux-cachyos-rc/PKGBUILD@@ -148,6 +148,15 @@ _use_llvm_lto=${_use_llvm_lto-}# https://github.com/CachyOS/linux-cachyos/issues/36_use_lto_suffix=${_use_lto_suffix-y}+# ATTENTION!: Really experimental LTO implementation for GCC+# This can improve the performance of the kernel+# The performance difference is currently negligible+# DEBUG and BTF needs to be disabled, otherwise the compilation is failing+# The Kernel is bigger with GCC LTO due to more inlining+# More informations:+# https://lore.kernel.org/lkml/[email protected]/T/#md8014ad799b02221b67f33584002d98ede6234eb+_use_gcc_lto=${_use_gcc_lto-}+# KCFI is a proposed forward-edge control-flow integrity scheme for# Clang, which is more suitable for kernel use than the existing CFI# scheme used by CONFIG_CFI_CLANG. KCFI doesn't require LTO, doesn't@@ -304,6 +313,12 @@ fiif [ -n "$_rtkernel" ]; thensource+=("${_patchsource}/misc/0001-rt.patch")fi+if [ -n "$_use_gcc_lto" ]; then+## GCC-LTO Patch+## Fix for current gcc --enable-default-pie option+ source+=("${_patchsource}/misc/gcc-lto/0001-gcc-LTO-support-for-the-kernel.patch"+ "${_patchsource}/misc/gcc-lto/0002-gcc-lto-no-pie.patch")+fiexport KBUILD_BUILD_HOST=cachyosexport KBUILD_BUILD_USER=$pkgbase@@ -450,6 +465,15 @@ prepare() {scripts/config --enable LTO_NONEfi+ ### Enable GCC FULL LTO+ ### Disable LTO_CP_CLONE, its experimental+ if [ -n "$_use_gcc_lto" ]; then+ scripts/config --enable LTO_GCC \+ --disable LTO_CP_CLONE+ ### Disable DEBUG, pahole is currently broken with GCC LTO+ _disable_debug=y+ fi+### Select tick rateif [ "$_HZ_ticks" = "1000" ]; thenecho "Setting tick rate to 1k Hz..."@@ -1037,9 +1061,9 @@ for _p in "${pkgname[@]}"; dodonesha256sums=('51307576df4a1651dcad4e361e6e411cfe9ed7841783c198a72ed7d89e3057c3'- '6a78ba1cabbbac20ca5c53f8ce179053d859374342611801c232f779d6483bec'+ '775c599894bc0b59190975835146da68dbf0c9241de7b0e3e5962e24ced42b94''34e2cad286f32d8c1c26e4ff18726c9e0aee151e82088bb78c3ae4fb536bf962''e1d45b5842079a5f0f53d7ea2d66ffa3f1497766f3ccffcf13ed00f1ac67f95e''d1400a8f486ffc2362ca5ba791f7ff71f8219461c18014fb2f90bb615c41a9c5'- 'ce5a95bdf23cd8d86f0494ebc813a1733eac51910b30092c4ee20542d1c21848'- '90d3bc76d3efae6b15002cbcc0b5e812beea721b17bfab2f6781d338e02db93b')+ '5c379c9cd2c74bca8ff92db7fedc46aab7c54289b39fba2d79b91ead89aa0a99'+ '70874e69a9383cbdf3c033193a7d6706783fe06e3b0205208f9491ac53bb25b6')diff --git a/linux-cachyos-rc/config b/linux-cachyos-rc/configindex a28a978b..4598fdb4 100644--- a/linux-cachyos-rc/config+++ b/linux-cachyos-rc/config@@ -533,7 +533,6 @@ CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=0CONFIG_X86_PAT=yCONFIG_ARCH_USES_PG_UNCACHED=y-CONFIG_ARCH_RANDOM=yCONFIG_X86_UMIP=yCONFIG_CC_HAS_IBT=y# CONFIG_X86_KERNEL_IBT is not set@@ -561,7 +560,6 @@ CONFIG_ARCH_HAS_KEXEC_PURGATORY=yCONFIG_KEXEC_SIG=y# CONFIG_KEXEC_SIG_FORCE is not setCONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y-CONFIG_KEXEC_PURGATORY_SKIP_SIG=yCONFIG_CRASH_DUMP=yCONFIG_KEXEC_JUMP=yCONFIG_PHYSICAL_START=0x1000000@@ -878,12 +876,16 @@ CONFIG_HAVE_ARCH_STACKLEAK=yCONFIG_HAVE_STACKPROTECTOR=yCONFIG_STACKPROTECTOR=yCONFIG_STACKPROTECTOR_STRONG=y+CONFIG_LTO=yCONFIG_ARCH_SUPPORTS_LTO_CLANG=yCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y+CONFIG_ARCH_SUPPORTS_LTO_GCC=yCONFIG_HAS_LTO_CLANG=yCONFIG_LTO_NONE=y# CONFIG_LTO_CLANG_FULL is not set# CONFIG_LTO_CLANG_THIN is not set+# CONFIG_LTO_GCC is not set+# CONFIG_LTO_CP_CLONE is not setCONFIG_ARCH_SUPPORTS_CFI_CLANG=yCONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=yCONFIG_HAVE_CONTEXT_TRACKING_USER=y