Skip to content

Archlinux Kernel based on different schedulers and some other performance improvements.

5.17.4-2

Peter Jungde7d8ef5a534
diff --git a/linux-bore/.SRCINFO b/linux-bore/.SRCINFO
index 45c092b5..c3cbdf6b 100755
--- a/linux-bore/.SRCINFO
+++ b/linux-bore/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-bore
pkgdesc = Linux BORE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
diff --git a/linux-bore/PKGBUILD b/linux-bore/PKGBUILD
index a1f46c1c..06e3a8bf 100644
--- a/linux-bore/PKGBUILD
+++ b/linux-bore/PKGBUILD
@@ -52,12 +52,16 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
@@ -71,6 +75,7 @@ _lru_enable=y
_damon=y
_spf_enable=y
+
### Enable Linux Random Number Generator
_lrng_enable=y
@@ -104,16 +109,18 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
if [ -n "$_use_llvm_lto" ]; then
- pkgbase=linux-bore-lto
+ pkgbase=linux-${_cpusched}-lto
else
- pkgbase=linux-bore
+ pkgbase=linux-${_cpusched}
fi
_major=5.17
_minor=4
@@ -127,7 +134,7 @@ _srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
pkgdesc='Linux BORE scheduler Kernel by CachyOS with other patches and improvements'
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -140,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- # "${_patchsource}/sched/0001-prjc.patch"
- # "${_patchsource}/sched/0001-cacULE.patch"
- "${_patchsource}/sched/0001-bore-sched.patch"
- # "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -160,7 +183,6 @@ source=(
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
"${_patchsource}/0016-ck-hrtimer.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -252,7 +274,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -261,6 +285,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -330,11 +366,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -342,6 +373,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -369,7 +427,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -514,6 +572,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
diff --git a/linux-cachyos-bmq/.SRCINFO b/linux-cachyos-bmq/.SRCINFO
index fe2b5cbe..cb7332b4 100755
--- a/linux-cachyos-bmq/.SRCINFO
+++ b/linux-cachyos-bmq/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-bmq
pkgdesc = Linux BMQ scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
@@ -45,7 +45,7 @@ pkgbase = linux-cachyos-bmq
source = auto-cpu-optimization.sh
sha256sums = 6e3cd56ee83a9cb5ac3fde1442c40367ab67368946c4c93bbeb1c65664a0d3c5
sha256sums = 29c5dd2ae6b452b75b25816a8f6610fa2ff54f21b22a0ccef5c2e98a7077eb36
- sha256sums = 25ff374e8fe339dc28042cb38defe245c71aae9689dfaf3e5cc84a546150e45b
+ sha256sums = a1f1dba089c7e66f549e5343462fd87c033c28dc53788417061dc71114b26c5b
sha256sums = e2109061823fe11e99eb5002b3d553ef9629c8495b974af36fc4113889dd0080
sha256sums = efd954e75525fb169c3e7d5f4a8b673f8a59469c9c5f8843c9255efbda48e6a9
sha256sums = 80d4a1e4c7f3cbed102de9079859b34a942d4e6424bf86c34a6b00d90f51fdb3
diff --git a/linux-cachyos-bmq/PKGBUILD b/linux-cachyos-bmq/PKGBUILD
index a4790c25..71780361 100644
--- a/linux-cachyos-bmq/PKGBUILD
+++ b/linux-cachyos-bmq/PKGBUILD
@@ -52,21 +52,22 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
### Disable Kyber I/O scheduler
_kyber_disable=y
-### Enable protect file mappings under memory pressure
-_mm_protect=
-
### Enable multigenerational LRU
_lru_enable=y
@@ -108,20 +109,18 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
-## Enable PGO (patch is failing when cfi is also used)
-#_use_pgo=
-
-
if [ -n "$_use_llvm_lto" ]; then
- pkgbase=linux-cachyos-bmq-lto
+ pkgbase=linux-cachyos-${_cpusched}-lto
else
- pkgbase=linux-cachyos-bmq
+ pkgbase=linux-cachyos-${_cpusched}
fi
_major=5.17
_minor=4
@@ -135,7 +134,7 @@ _srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
pkgdesc='Linux BMQ scheduler Kernel by CachyOS with other patches and improvements'
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -148,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- "${_patchsource}/sched/0001-prjc.patch"
- # "${_patchsource}/sched/0001-cacULE.patch"
- # "${_patchsource}/sched/0001-bore-sched.patch"
- # "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -167,7 +182,6 @@ source=(
"${_patchsource}/0013-xanmod.patch"
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -259,7 +273,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -268,6 +284,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -337,11 +365,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -349,6 +372,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -376,7 +426,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -521,6 +571,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
@@ -692,7 +745,7 @@ done
sha256sums=('6e3cd56ee83a9cb5ac3fde1442c40367ab67368946c4c93bbeb1c65664a0d3c5'
'29c5dd2ae6b452b75b25816a8f6610fa2ff54f21b22a0ccef5c2e98a7077eb36'
- '25ff374e8fe339dc28042cb38defe245c71aae9689dfaf3e5cc84a546150e45b'
+ 'a1f1dba089c7e66f549e5343462fd87c033c28dc53788417061dc71114b26c5b'
'e2109061823fe11e99eb5002b3d553ef9629c8495b974af36fc4113889dd0080'
'efd954e75525fb169c3e7d5f4a8b673f8a59469c9c5f8843c9255efbda48e6a9'
'80d4a1e4c7f3cbed102de9079859b34a942d4e6424bf86c34a6b00d90f51fdb3'
diff --git a/linux-cachyos-bore/.SRCINFO b/linux-cachyos-bore/.SRCINFO
index 39ab5cde..42f153fb 100755
--- a/linux-cachyos-bore/.SRCINFO
+++ b/linux-cachyos-bore/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-bore
pkgdesc = Linux BORE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
@@ -26,6 +26,7 @@ pkgbase = linux-cachyos-bore
options = !strip
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.17.4.tar.xz
source = config
+ source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.17/sched/0001-bore-sched.patch
source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.17/0001-arch.patch
source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.17/0002-anbox.patch
source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.17/0003-bbr2.patch
@@ -45,6 +46,7 @@ pkgbase = linux-cachyos-bore
source = auto-cpu-optimization.sh
sha256sums = 6e3cd56ee83a9cb5ac3fde1442c40367ab67368946c4c93bbeb1c65664a0d3c5
sha256sums = 29c5dd2ae6b452b75b25816a8f6610fa2ff54f21b22a0ccef5c2e98a7077eb36
+ sha256sums = 0f99f7935f545033eff35b5e4ffa54142c31c7034ee801cd1534fe085351f019
sha256sums = e2109061823fe11e99eb5002b3d553ef9629c8495b974af36fc4113889dd0080
sha256sums = efd954e75525fb169c3e7d5f4a8b673f8a59469c9c5f8843c9255efbda48e6a9
sha256sums = 80d4a1e4c7f3cbed102de9079859b34a942d4e6424bf86c34a6b00d90f51fdb3
diff --git a/linux-cachyos-bore/PKGBUILD b/linux-cachyos-bore/PKGBUILD
index 039b8739..28733f96 100644
--- a/linux-cachyos-bore/PKGBUILD
+++ b/linux-cachyos-bore/PKGBUILD
@@ -52,21 +52,22 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
### Disable Kyber I/O scheduler
_kyber_disable=y
-### Enable protect file mappings under memory pressure
-_mm_protect=
-
### Enable multigenerational LRU
_lru_enable=y
@@ -108,17 +109,18 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
-
if [ -n "$_use_llvm_lto" ]; then
- pkgbase=linux-cachyos-bore-lto
+ pkgbase=linux-cachyos-${_cpusched}-lto
else
- pkgbase=linux-cachyos-bore
+ pkgbase=linux-cachyos-${_cpusched}
fi
_major=5.17
_minor=4
@@ -132,7 +134,7 @@ _srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
pkgdesc='Linux BORE scheduler Kernel by CachyOS with other patches and improvements'
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -145,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- # "${_patchsource}/sched/0001-prjc.patch"
- # "${_patchsource}/sched/0001-cacULE.patch"
- # "${_patchsource}/sched/0001-bore-sched.patch"
- # "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -165,7 +183,6 @@ source=(
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
"${_patchsource}/0016-ck-hrtimer.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -257,7 +274,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -266,6 +285,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -335,11 +366,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -347,6 +373,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -374,7 +427,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -519,6 +572,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
@@ -690,6 +746,7 @@ done
sha256sums=('6e3cd56ee83a9cb5ac3fde1442c40367ab67368946c4c93bbeb1c65664a0d3c5'
'29c5dd2ae6b452b75b25816a8f6610fa2ff54f21b22a0ccef5c2e98a7077eb36'
+ '0f99f7935f545033eff35b5e4ffa54142c31c7034ee801cd1534fe085351f019'
'e2109061823fe11e99eb5002b3d553ef9629c8495b974af36fc4113889dd0080'
'efd954e75525fb169c3e7d5f4a8b673f8a59469c9c5f8843c9255efbda48e6a9'
'80d4a1e4c7f3cbed102de9079859b34a942d4e6424bf86c34a6b00d90f51fdb3'
diff --git a/linux-cachyos-cacule/.SRCINFO b/linux-cachyos-cacule/.SRCINFO
index 06f6231a..9c66b031 100755
--- a/linux-cachyos-cacule/.SRCINFO
+++ b/linux-cachyos-cacule/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-cacule
pkgdesc = Linux cacULE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
diff --git a/linux-cachyos-cacule/PKGBUILD b/linux-cachyos-cacule/PKGBUILD
index 083b84fd..64ba73a6 100644
--- a/linux-cachyos-cacule/PKGBUILD
+++ b/linux-cachyos-cacule/PKGBUILD
@@ -52,12 +52,16 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
@@ -70,7 +74,6 @@ _lru_enable=y
### Enable DAMON
_damon=y
-
_spf_enable=y
### Enable Linux Random Number Generator
@@ -106,17 +109,18 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
-
if [ -n "$_use_llvm_lto" ]; then
- pkgbase=linux-cachyos-cacule-lto
+ pkgbase=linux-cachyos-${_cpusched}-lto
else
- pkgbase=linux-cachyos-cacule
+ pkgbase=linux-cachyos-${_cpusched}
fi
_major=5.17
_minor=4
@@ -130,7 +134,7 @@ _srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
pkgdesc='Linux cacULE scheduler Kernel by CachyOS with other patches and improvements'
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -143,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- # "${_patchsource}/sched/0001-prjc.patch"
- "${_patchsource}/sched/0001-cacULE.patch"
- # "${_patchsource}/sched/0001-bore-sched.patch"
- # "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -163,7 +183,6 @@ source=(
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
"${_patchsource}/0016-ck-hrtimer.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -255,7 +274,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -264,6 +285,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -333,11 +366,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -345,6 +373,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -372,7 +427,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -517,6 +572,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
diff --git a/linux-cachyos-pds/.SRCINFO b/linux-cachyos-pds/.SRCINFO
index 23198859..f98f6047 100755
--- a/linux-cachyos-pds/.SRCINFO
+++ b/linux-cachyos-pds/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-pds
pkgdesc = Linux PDS scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
@@ -45,7 +45,7 @@ pkgbase = linux-cachyos-pds
source = auto-cpu-optimization.sh
sha256sums = 6e3cd56ee83a9cb5ac3fde1442c40367ab67368946c4c93bbeb1c65664a0d3c5
sha256sums = 29c5dd2ae6b452b75b25816a8f6610fa2ff54f21b22a0ccef5c2e98a7077eb36
- sha256sums = 25ff374e8fe339dc28042cb38defe245c71aae9689dfaf3e5cc84a546150e45b
+ sha256sums = a1f1dba089c7e66f549e5343462fd87c033c28dc53788417061dc71114b26c5b
sha256sums = e2109061823fe11e99eb5002b3d553ef9629c8495b974af36fc4113889dd0080
sha256sums = efd954e75525fb169c3e7d5f4a8b673f8a59469c9c5f8843c9255efbda48e6a9
sha256sums = 80d4a1e4c7f3cbed102de9079859b34a942d4e6424bf86c34a6b00d90f51fdb3
diff --git a/linux-cachyos-pds/PKGBUILD b/linux-cachyos-pds/PKGBUILD
index 8a448154..7f2a590c 100644
--- a/linux-cachyos-pds/PKGBUILD
+++ b/linux-cachyos-pds/PKGBUILD
@@ -52,12 +52,16 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
@@ -105,16 +109,18 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
if [ -n "$_use_llvm_lto" ]; then
- pkgbase=linux-cachyos-pds-lto
+ pkgbase=linux-cachyos-${_cpusched}-lto
else
- pkgbase=linux-cachyos-pds
+ pkgbase=linux-cachyos-${_cpusched}
fi
_major=5.17
_minor=4
@@ -128,7 +134,7 @@ _srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
pkgdesc='Linux PDS scheduler Kernel by CachyOS with other patches and improvements'
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -141,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- "${_patchsource}/sched/0001-prjc.patch"
- # "${_patchsource}/sched/0001-cacULE.patch"
- # "${_patchsource}/sched/0001-bore-sched.patch"
- # "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -160,7 +182,6 @@ source=(
"${_patchsource}/0013-xanmod.patch"
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -252,7 +273,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -261,6 +284,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -330,11 +365,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -342,6 +372,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -369,7 +426,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -514,6 +571,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
@@ -685,7 +745,7 @@ done
sha256sums=('6e3cd56ee83a9cb5ac3fde1442c40367ab67368946c4c93bbeb1c65664a0d3c5'
'29c5dd2ae6b452b75b25816a8f6610fa2ff54f21b22a0ccef5c2e98a7077eb36'
- '25ff374e8fe339dc28042cb38defe245c71aae9689dfaf3e5cc84a546150e45b'
+ 'a1f1dba089c7e66f549e5343462fd87c033c28dc53788417061dc71114b26c5b'
'e2109061823fe11e99eb5002b3d553ef9629c8495b974af36fc4113889dd0080'
'efd954e75525fb169c3e7d5f4a8b673f8a59469c9c5f8843c9255efbda48e6a9'
'80d4a1e4c7f3cbed102de9079859b34a942d4e6424bf86c34a6b00d90f51fdb3'
diff --git a/linux-cachyos-tt/.SRCINFO b/linux-cachyos-tt/.SRCINFO
index e5eca9a5..b7170345 100755
--- a/linux-cachyos-tt/.SRCINFO
+++ b/linux-cachyos-tt/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-tt
- pkgdesc = Linux TT scheduler Kernel by CachyOS and other patches and improvements
+ pkgdesc = Linux TT scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
@@ -66,7 +66,7 @@ pkgbase = linux-cachyos-tt
sha256sums = 65ec9ac5b8b28d5b61df1c72498059be2e7cb1f9b965bac0e4ffed3c05520b2b
pkgname = linux-cachyos-tt
- pkgdesc = The Linux TT scheduler Kernel by CachyOS and other patches and improvements kernel and modules
+ pkgdesc = The Linux TT scheduler Kernel by CachyOS with other patches and improvements kernel and modules
depends = coreutils
depends = kmod
depends = initramfs
@@ -78,5 +78,5 @@ pkgname = linux-cachyos-tt
provides = KSMBD-MODULE
pkgname = linux-cachyos-tt-headers
- pkgdesc = Headers and scripts for building modules for the Linux TT scheduler Kernel by CachyOS and other patches and improvements kernel
+ pkgdesc = Headers and scripts for building modules for the Linux TT scheduler Kernel by CachyOS with other patches and improvements kernel
depends = pahole
diff --git a/linux-cachyos-tt/PKGBUILD b/linux-cachyos-tt/PKGBUILD
index 8db6fcc2..5c83bb99 100644
--- a/linux-cachyos-tt/PKGBUILD
+++ b/linux-cachyos-tt/PKGBUILD
@@ -52,12 +52,16 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
@@ -105,16 +109,18 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
if [ -n "$_use_llvm_lto" ]; then
- pkgbase=linux-cachyos-tt-lto
+ pkgbase=linux-cachyos-${_cpusched}-lto
else
- pkgbase=linux-cachyos-tt
+ pkgbase=linux-cachyos-${_cpusched}
fi
_major=5.17
_minor=4
@@ -127,8 +133,8 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
-pkgdesc='Linux TT scheduler Kernel by CachyOS and other patches and improvements'
-pkgrel=1
+pkgdesc='Linux TT scheduler Kernel by CachyOS with other patches and improvements'
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -141,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- # "${_patchsource}/sched/0001-prjc.patch"
- # "${_patchsource}/sched/0001-cacULE.patch"
- # "${_patchsource}/sched/0001-bore-sched.patch"
- "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -161,7 +183,6 @@ source=(
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
"${_patchsource}/0016-ck-hrtimer.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -253,7 +274,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -262,6 +285,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -331,11 +366,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -343,6 +373,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -370,7 +427,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -515,6 +572,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
diff --git a/linux-cachyos/.SRCINFO b/linux-cachyos/.SRCINFO
index 3abc612d..954b1476 100755
--- a/linux-cachyos/.SRCINFO
+++ b/linux-cachyos/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos
- pkgdesc = Linux CFS scheduler Kernel by CachyOS and with other patches and improvements
+ pkgdesc = Linux CFS scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
@@ -64,7 +64,7 @@ pkgbase = linux-cachyos
sha256sums = 65ec9ac5b8b28d5b61df1c72498059be2e7cb1f9b965bac0e4ffed3c05520b2b
pkgname = linux-cachyos
- pkgdesc = The Linux CFS scheduler Kernel by CachyOS and with other patches and improvements kernel and modules
+ pkgdesc = The Linux CFS scheduler Kernel by CachyOS with other patches and improvements kernel and modules
depends = coreutils
depends = kmod
depends = initramfs
@@ -76,5 +76,5 @@ pkgname = linux-cachyos
provides = KSMBD-MODULE
pkgname = linux-cachyos-headers
- pkgdesc = Headers and scripts for building modules for the Linux CFS scheduler Kernel by CachyOS and with other patches and improvements kernel
+ pkgdesc = Headers and scripts for building modules for the Linux CFS scheduler Kernel by CachyOS with other patches and improvements kernel
depends = pahole
diff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILD
index c9f79837..ed99eb35 100644
--- a/linux-cachyos/PKGBUILD
+++ b/linux-cachyos/PKGBUILD
@@ -24,7 +24,7 @@ _makenconfig=
# NUMA is optimized for multi-socket motherboards.
# A single multi-core CPU actually runs slower with NUMA enabled.
# See, https://bugs.archlinux.org/task/31187
-_NUMAdisable=
+_NUMAdisable=y
# Compile ONLY used modules to VASTLYreduce the number of modules built
# and the build time.
@@ -52,12 +52,16 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
@@ -71,6 +75,7 @@ _lru_enable=y
_damon=y
_spf_enable=y
+
### Enable Linux Random Number Generator
_lrng_enable=y
@@ -104,13 +109,14 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
-
if [ -n "$_use_llvm_lto" ]; then
pkgbase=linux-cachyos-lto
else
@@ -127,8 +133,8 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
-pkgdesc='Linux CFS scheduler Kernel by CachyOS and with other patches and improvements'
-pkgrel=1
+pkgdesc='Linux CFS scheduler Kernel by CachyOS with other patches and improvements'
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -141,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- # "${_patchsource}/sched/0001-prjc.patch"
- # "${_patchsource}/sched/0001-cacULE.patch"
- # "${_patchsource}/sched/0001-bore-sched.patch"
- # "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -161,7 +183,6 @@ source=(
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
"${_patchsource}/0016-ck-hrtimer.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -253,7 +274,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -262,6 +285,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -331,11 +366,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -343,6 +373,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -370,7 +427,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -515,6 +572,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
diff --git a/linux-cacule-rdb/.SRCINFO b/linux-cacule-rdb/.SRCINFO
index e7c3fe0c..6499ec20 100755
--- a/linux-cacule-rdb/.SRCINFO
+++ b/linux-cacule-rdb/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-cacule-rdb
pkgdesc = Linux cacULE-RDB scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
diff --git a/linux-cacule-rdb/PKGBUILD b/linux-cacule-rdb/PKGBUILD
index b5f2656f..a5704eee 100644
--- a/linux-cacule-rdb/PKGBUILD
+++ b/linux-cacule-rdb/PKGBUILD
@@ -52,12 +52,16 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
@@ -105,16 +109,18 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
if [ -n "$_use_llvm_lto" ]; then
- pkgbase=linux-cacule-rdb-lto
+ pkgbase=linux-${_cpusched}-lto
else
- pkgbase=linux-cacule-rdb
+ pkgbase=linux-${_cpusched}
fi
_major=5.17
_minor=4
@@ -128,7 +134,7 @@ _srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
pkgdesc='Linux cacULE-RDB scheduler Kernel by CachyOS with other patches and improvements'
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -141,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- # "${_patchsource}/sched/0001-prjc.patch"
- "${_patchsource}/sched/0001-cacULE.patch"
- # "${_patchsource}/sched/0001-bore-sched.patch"
- # "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -161,7 +183,6 @@ source=(
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
"${_patchsource}/0016-ck-hrtimer.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -253,7 +274,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -262,6 +285,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -331,11 +366,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -343,6 +373,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -370,7 +427,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -515,6 +572,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
diff --git a/linux-cacule/.SRCINFO b/linux-cacule/.SRCINFO
index 79cb9941..e84a41ca 100755
--- a/linux-cacule/.SRCINFO
+++ b/linux-cacule/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-cacule
pkgdesc = Linux cacULE scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
@@ -42,7 +42,6 @@ pkgbase = linux-cacule
source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.17/0013-xanmod.patch
source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.17/0014-lrng.patch
source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.17/0015-le9.patch
- source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.17/0016-ck-hrtimer.patch
source = auto-cpu-optimization.sh
sha256sums = 6e3cd56ee83a9cb5ac3fde1442c40367ab67368946c4c93bbeb1c65664a0d3c5
sha256sums = 341d996a829058d17393f4d0cbfdb23c7a7a68ee682fd70cb8e37d27af63efa5
@@ -62,7 +61,6 @@ pkgbase = linux-cacule
sha256sums = d2405846ab0501eb993180a0f6fa1e1ef81bac51a73ca00ff8ee3e75551b1886
sha256sums = c7048e30409190daa5e1e5a7994f4a3c28d7bc4714b8256d3d67a562a3ab3bec
sha256sums = 0ec74fbdd5c114026f07128fb84d0191157b2787141645545722b3f52aaa2187
- sha256sums = d15fe026c0872ec902dcfd35c180746488b294d9ebf059b8e2699f970ead3734
sha256sums = 65ec9ac5b8b28d5b61df1c72498059be2e7cb1f9b965bac0e4ffed3c05520b2b
pkgname = linux-cacule
diff --git a/linux-cacule/PKGBUILD b/linux-cacule/PKGBUILD
index 4e2485db..76a73498 100644
--- a/linux-cacule/PKGBUILD
+++ b/linux-cacule/PKGBUILD
@@ -52,12 +52,16 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
@@ -105,17 +109,18 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
-
if [ -n "$_use_llvm_lto" ]; then
- pkgbase=linux-cacule-lto
+ pkgbase=linux-${_cpusched}-lto
else
- pkgbase=linux-cacule
+ pkgbase=linux-${_cpusched}
fi
_major=5.17
_minor=4
@@ -129,7 +134,7 @@ _srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
pkgdesc='Linux cacULE scheduler Kernel by CachyOS with other patches and improvements'
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -142,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- # "${_patchsource}/sched/0001-prjc.patch"
- "${_patchsource}/sched/0001-cacULE.patch"
- # "${_patchsource}/sched/0001-bore-sched.patch"
- # "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -161,8 +182,6 @@ source=(
"${_patchsource}/0013-xanmod.patch"
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
- "${_patchsource}/0016-ck-hrtimer.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -254,7 +273,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -263,6 +284,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -332,11 +365,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -344,6 +372,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -371,7 +426,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -516,6 +571,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
@@ -703,5 +761,4 @@ sha256sums=('6e3cd56ee83a9cb5ac3fde1442c40367ab67368946c4c93bbeb1c65664a0d3c5'
'd2405846ab0501eb993180a0f6fa1e1ef81bac51a73ca00ff8ee3e75551b1886'
'c7048e30409190daa5e1e5a7994f4a3c28d7bc4714b8256d3d67a562a3ab3bec'
'0ec74fbdd5c114026f07128fb84d0191157b2787141645545722b3f52aaa2187'
- 'd15fe026c0872ec902dcfd35c180746488b294d9ebf059b8e2699f970ead3734'
'65ec9ac5b8b28d5b61df1c72498059be2e7cb1f9b965bac0e4ffed3c05520b2b')
diff --git a/linux-tt/.SRCINFO b/linux-tt/.SRCINFO
index cfcfb972..1ec23ddf 100755
--- a/linux-tt/.SRCINFO
+++ b/linux-tt/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-tt
- pkgdesc = Linux TT scheduler Kernel by CachyOS and other patches and improvements
+ pkgdesc = Linux TT scheduler Kernel by CachyOS with other patches and improvements
pkgver = 5.17.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
@@ -66,7 +66,7 @@ pkgbase = linux-tt
sha256sums = 65ec9ac5b8b28d5b61df1c72498059be2e7cb1f9b965bac0e4ffed3c05520b2b
pkgname = linux-tt
- pkgdesc = The Linux TT scheduler Kernel by CachyOS and other patches and improvements kernel and modules
+ pkgdesc = The Linux TT scheduler Kernel by CachyOS with other patches and improvements kernel and modules
depends = coreutils
depends = kmod
depends = initramfs
@@ -78,5 +78,5 @@ pkgname = linux-tt
provides = KSMBD-MODULE
pkgname = linux-tt-headers
- pkgdesc = Headers and scripts for building modules for the Linux TT scheduler Kernel by CachyOS and other patches and improvements kernel
+ pkgdesc = Headers and scripts for building modules for the Linux TT scheduler Kernel by CachyOS with other patches and improvements kernel
depends = pahole
diff --git a/linux-tt/PKGBUILD b/linux-tt/PKGBUILD
index 31d797d4..d8334708 100644
--- a/linux-tt/PKGBUILD
+++ b/linux-tt/PKGBUILD
@@ -52,12 +52,16 @@ _per_gov=y
### Enable TCP_CONG_BBR2
_tcp_bbr2=y
-### Running with a 1000HZ, 750Hz or 500HZ tick rate
+### Running with a 1000HZ, 750Hz, 600 Hz or 500Hz tick rate
_1k_HZ_ticks=
_750_HZ_ticks=y
_600_HZ_ticks=
_500_HZ_ticks=
+##ä Choose between perodic, tickless idle or full tickless
+### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based).
+_tickrate=full
+
### Disable MQ-Deadline I/O scheduler
_mq_deadline_disable=y
@@ -105,16 +109,18 @@ _zstd_compression=y
_nf_cone=y
-## Enable it for compiling with LLVM and THINLTO
+# Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin".
+# "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."
_use_llvm_lto=
# Enable it for using the LLVM CFI PATCH for a better security
_use_cfi=
if [ -n "$_use_llvm_lto" ]; then
- pkgbase=linux-tt-lto
+ pkgbase=linux-${_cpusched}-lto
else
- pkgbase=linux-tt
+ pkgbase=linux-${_cpusched}
fi
_major=5.17
_minor=4
@@ -127,8 +133,8 @@ _stable=${_major}.${_minor}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
arch=(x86_64 x86_64_v3)
-pkgdesc='Linux TT scheduler Kernel by CachyOS and other patches and improvements'
-pkgrel=1
+pkgdesc='Linux TT scheduler Kernel by CachyOS with other patches and improvements'
+pkgrel=2
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
license=('GPL2')
@@ -141,10 +147,26 @@ _patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/${
source=(
"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz"
"config"
- # "${_patchsource}/sched/0001-prjc.patch"
- # "${_patchsource}/sched/0001-cacULE.patch"
- # "${_patchsource}/sched/0001-bore-sched.patch"
- "${_patchsource}/sched/0001-tt.patch"
+)
+if [ "$_cpusched" = "bmq" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "pds" ]; then
+ source+=("${_patchsource}/sched/0001-prjc.patch")
+fi
+if [ "$_cpusched" = "cacule" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "cacule-rdb" ]; then
+ source+=("${_patchsource}/sched/0001-cacULE.patch")
+fi
+if [ "$_cpusched" = "tt" ]; then
+ source+=("${_patchsource}/sched/0001-tt.patch")
+fi
+if [ "$_cpusched" = "bore" ]; then
+ source+=("${_patchsource}/sched/0001-bore-sched.patch")
+fi
+source+=(
"${_patchsource}/0001-arch.patch"
"${_patchsource}/0002-anbox.patch"
"${_patchsource}/0003-bbr2.patch"
@@ -161,7 +183,6 @@ source=(
"${_patchsource}/0014-lrng.patch"
"${_patchsource}/0015-le9.patch"
"${_patchsource}/0016-ck-hrtimer.patch"
- # "${_patchsource}/0017-FG-KASLR.patch"
"auto-cpu-optimization.sh"
)
@@ -253,7 +274,9 @@ prepare() {
scripts/config --enable CONFIG_CFI_CLANG
fi
- if [ -n "$_use_llvm_lto" ]; then
+ ### Selecting the THIN or FULL-LTO compression level
+ if [ "$_use_llvm_lto" = "thin" ]; then
+ echo "Enabling highest ZSTD compression ratio..."
scripts/config --disable LTO_NONE \
--enable LTO \
--enable LTO_CLANG \
@@ -262,6 +285,18 @@ prepare() {
--enable HAS_LTO_CLANG \
--enable LTO_CLANG_THIN \
--enable HAVE_GCC_PLUGINS
+ elif [ "$_use_llvm_lto" = "full" ]; then
+ echo "Enabling standard ZSTD compression ratio..."
+ scripts/config --disable LTO_NONE \
+ --enable LTO \
+ --enable LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG \
+ --enable ARCH_SUPPORTS_LTO_CLANG_THIN \
+ --enable HAS_LTO_CLANG \
+ --enable LTO_CLANG \
+ --enable HAVE_GCC_PLUGINS
+ else
+ scripts/config --enable CONFIG_LTO_NONE
fi
### Optionally set tickrate to 1000
@@ -331,11 +366,6 @@ prepare() {
echo "Setting performance governor..."
scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
- echo "Disabling uneeded governors..."
- scripts/config --disable CONFIG_CPU_FREQ_GOV_ONDEMAND
- scripts/config --disable CONFIG_CPU_FREQ_GOV_CONSERVATIVE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_USERSPACE
- scripts/config --disable CONFIG_CPU_FREQ_GOV_SCHEDUTIL
echo "Set PCIEASPM DRIVER to performance..."
scripts/config --enable CONFIG_PCIEASPM
scripts/config --enable CONFIG_PCIEASPM_PERFORMANCE
@@ -343,6 +373,33 @@ prepare() {
scripts/config --enable CONFIG_PCIE_BUS_PERFORMANCE
fi
+ ### Selecting between tickless idle, perodic tics or full tickless
+ if [ "$_tickrate" = "perodic" ]; then
+ echo "Enabling periodic ticks..."
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --disable CONFIG_NO_HZ
+ scripts/config --disable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_HZ_PERIODIC
+ elif [ "$_tickrate" = "idle" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ_IDLE
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ elif [ "$_tickrate" = "full" ]; then
+ echo "Enabling tickless idle..."
+ scripts/config --disable CONFIG_HZ_PERIODIC
+ scripts/config --disable CONFIG_NO_HZ_IDLE
+ scripts/config --disable CONFIG_CONTEXT_TRACKING_FORCE
+ scripts/config --enable CONFIG_NO_HZ_FULL_NODEF
+ scripts/config --enable CONFIG_NO_HZ_FULL
+ scripts/config --enable CONFIG_NO_HZ
+ scripts/config --enable CONFIG_NO_HZ_COMMON
+ scripts/config --enable CONFIG_CONTEXT_TRACKING
+ fi
+
### Enable KBUILD_CFLAGS -O3
if [ -n "$_cc_harder" ]; then
echo "Enabling KBUILD_CFLAGS -O3..."
@@ -370,7 +427,7 @@ prepare() {
### Enable SPF
if [ -n "$_spf_enable" ]; then
- echo "Enabling multigenerational LRU..."
+ echo "Enabling SPECULATIVE_PAGE_FAULT LRU..."
scripts/config --enable CONFIG_SPECULATIVE_PAGE_FAULT
fi
@@ -515,6 +572,9 @@ prepare() {
scripts/config --disable CONFIG_SCHED_DEBUG
scripts/config --disable CONFIG_KVM_WERROR
+ echo "Enable CONFIG_USER_NS_UNPRIVILEGED"
+ scripts/config --enable CONFIG_USER_NS
+
### Optionally use running kernel's config
# code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
if [ -n "$_use_current" ]; then
diff --git a/script.sh b/script.sh
index d7e29498..3c1485a4 100755
--- a/script.sh
+++ b/script.sh
@@ -35,7 +35,7 @@ mv */*.tar.zst* /home/ptr1337/packages/
-find . -name "PKGBUILD" | xargs -I {} sed -i "s/_use_llvm_lto=/_use_llvm_lto==y/" {}
+find . -name "PKGBUILD" | xargs -I {} sed -i "s/_use_llvm_lto=/_use_llvm_lto=thin/" {}
files=$(find . -name "PKGBUILD")