Archlinux Kernel based on different schedulers and some other performance improvements.
Shell archlinuxbaby-schedcachycachy-schedulercachyoscacule-schedkernellinux-kernelperformanceperformance-tuning
linux-cachyos: Default to ThinLTO
Eric Naima479492eea73
diff --git a/linux-cachyos/.SRCINFO b/linux-cachyos/.SRCINFOindex 0375b998..d8020d01 100644--- a/linux-cachyos/.SRCINFO+++ b/linux-cachyos/.SRCINFO@@ -1,7 +1,7 @@pkgbase = linux-cachyospkgdesc = Linux SCHED-EXT + BORE + Cachy Sauce Kernel by CachyOS with other patches and improvementspkgver = 6.11.2- pkgrel = 2+ pkgrel = 4url = https://github.com/CachyOS/linux-cachyosarch = x86_64license = GPL-2.0-only@@ -15,6 +15,9 @@ pkgbase = linux-cachyosmakedepends = tarmakedepends = xzmakedepends = zstd+ makedepends = clang+ makedepends = llvm+ makedepends = lldoptions = !stripoptions = !debugoptions = !lto@@ -22,6 +25,7 @@ pkgbase = linux-cachyossource = configsource = auto-cpu-optimization.shsource = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.11/all/0001-cachyos-base-all.patch+ source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.11/misc/dkms-clang.patchsource = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.11/sched/0001-sched-ext.patchsource = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.11/sched/0001-bore-cachy-ext.patchb2sums = 5720e8dd0bed0247dcfe0bdbce17e36e67bff56811611ae1b04f048b77b6e60c2a48303db73c5a0d4a56c7125cdd695116c4dfd965bd7cb28aa932f427bb3e7d@@ -45,8 +49,12 @@ pkgname = linux-cachyosprovides = WIREGUARD-MODULEprovides = KSMBD-MODULEprovides = UKSMD-BUILTIN+ provides = linux-cachyos-lto=6.11.2-4+ replaces = linux-cachyos-ltopkgname = linux-cachyos-headerspkgdesc = Headers and scripts for building modules for the Linux SCHED-EXT + BORE + Cachy Sauce Kernel by CachyOS with other patches and improvements kerneldepends = paholedepends = linux-cachyos+ provides = linux-cachyos-lto-headers=6.11.2-4+ replaces = linux-cachyos-lto-headersdiff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILDindex bb8b60db..c5391bec 100644--- a/linux-cachyos/PKGBUILD+++ b/linux-cachyos/PKGBUILD@@ -109,7 +109,7 @@ _use_auto_optimization=${_use_auto_optimization-y}# "full: uses 1 thread for Linking, slow and uses more memory, theoretically with the highest performance gains."# "thin: uses multiple threads, faster and uses less memory, may have a lower runtime performance than Full."# "none: disable LTO-_use_llvm_lto=${_use_llvm_lto-none}+_use_llvm_lto=${_use_llvm_lto-thin}# Use suffix -lto only when requested by the user# Enabled by default.@@ -143,11 +143,11 @@ _build_nvidia_open=${_build_nvidia_open-}_build_debug=${_build_debug-}if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] && [ "$_use_lto_suffix" = "y" ]; then- _pkgsuffix=cachyos-lto+ _pkgsuffix=cachyospkgbase="linux-$_pkgsuffix"elif [ -n "$_use_llvm_lto" ] || [[ "$_use_lto_suffix" = "n" ]]; then- _pkgsuffix=cachyos+ _pkgsuffix=cachyos-gccpkgbase="linux-$_pkgsuffix"fi_major=6.11@@ -161,7 +161,7 @@ _stable=${_major}.${_minor}_srcname=linux-${_stable}#_srcname=linux-${_major}pkgdesc='Linux SCHED-EXT + BORE + Cachy Sauce Kernel by CachyOS with other patches and improvements'-pkgrel=2+pkgrel=4_kernver="$pkgver-$pkgrel"_kernuname="${pkgver}-${_pkgsuffix}"arch=('x86_64')@@ -595,6 +595,12 @@ _package() {'uksmd: Userspace KSM helper daemon')provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE UKSMD-BUILTIN)+ # Replace LTO kernel with the default kernel+ if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then+ provides+=(linux-cachyos-lto=$_kernver)+ replaces=(linux-cachyos-lto)+ fi+cd "$_srcname"local modulesdir="$pkgdir/usr/lib/modules/$(<version)"@@ -619,6 +625,12 @@ _package-headers() {pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"depends=('pahole' "${pkgbase}")+ # Replace LTO kernel with the default kernel+ if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then+ provides+=(linux-cachyos-lto-headers=$_kernver)+ replaces=(linux-cachyos-lto-headers)+ fi+cd "${_srcname}"local builddir="$pkgdir/usr/lib/modules/$(<version)/build"@@ -704,6 +716,12 @@ _package-dbg(){pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel"depends=("${pkgbase}-headers")+ # Replace LTO kernel with the default kernel+ if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then+ provides+=(linux-cachyos-lto-dbg=$_kernver)+ replaces=(linux-cachyos-lto-dbg)+ fi+cd "${_srcname}"mkdir -p "$pkgdir/usr/src/debug/${pkgbase}"install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux@@ -715,6 +733,12 @@ _package-zfs(){provides=('ZFS-MODULE')license=('CDDL')+ # Replace LTO kernel with the default kernel+ if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then+ provides+=(linux-cachyos-lto-zfs=$_kernver)+ replaces=(linux-cachyos-lto-zfs)+ fi+cd "$_srcname"local modulesdir="$pkgdir/usr/lib/modules/$(<version)"@@ -732,6 +756,12 @@ _package-nvidia(){conflicts=("$pkgbase-nvidia-open")license=('custom')+ # Replace LTO kernel with the default kernel+ if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then+ provides+=(linux-cachyos-lto-nvidia=$_kernver)+ replaces=(linux-cachyos-lto-nvidia)+ fi+cd "$_srcname"local modulesdir="$pkgdir/usr/lib/modules/$(<version)"@@ -749,6 +779,12 @@ _package-nvidia-open(){conflicts=("$pkgbase-nvidia")license=('MIT AND GPL-2.0-only')+ # Replace LTO kernel with the default kernel+ if [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] || [ -n "$_use_kcfi" ]; then+ provides+=(linux-cachyos-lto-nvidia-open=$_kernver)+ replaces=(linux-cachyos-lto-nvidia-open)+ fi+cd "$_srcname"local modulesdir="$pkgdir/usr/lib/modules/$(<version)"diff --git a/script-v3-v4.sh b/script-v3-v4.shindex 90cb9ebd..d2b13558 100755--- a/script-v3-v4.sh+++ b/script-v3-v4.sh@@ -2,12 +2,14 @@find . -name "PKGBUILD" | xargs -I {} sed -i "s/_use_auto_optimization-y/_use_auto_optimization-/" {}## Enable ZFSfind . -name "PKGBUILD" | xargs -I {} sed -i "s/_build_zfs-/_build_zfs-y/" {}-## Enable Generic v3+## Enable Generic v3find . -name "PKGBUILD" | xargs -I {} sed -i "s/_processor_opt-/_processor_opt-GENERIC_V3/" {}## Enable NVIDIA modulefind . -name "PKGBUILD" | xargs -I {} sed -i "s/_build_nvidia-/_build_nvidia-y/" {}## Enable Open NVIDIA modulefind . -name "PKGBUILD" | xargs -I {} sed -i "s/_build_nvidia_open-/_build_nvidia_open-y/" {}+## Disable clang-LTO+find . -name "PKGBUILD" | xargs -I {} sed -i "s/_use_llvm_lto-thin/_use_llvm_lto-none/" {}## GCC v3 Kernel