Archlinux Kernel based on different schedulers and some other performance improvements.
Shell archlinuxbaby-schedcachycachy-schedulercachyoscacule-schedkernellinux-kernelperformanceperformance-tuning
5.16-rc8
P. Jung6be3d214cd6b
diff --git a/README.md b/README.mdindex 56040873..24455d38 100644--- a/README.md+++ b/README.md@@ -8,7 +8,7 @@ The CachyOS are improved kernels which improve the performance and other improve- CacULE and CacULE-RDB created from Hamad Marri, maintained by CachyOS - linux-cachyos-cacule- BitMap Queue (BMQ) Alfred Chen Scheduler - linux-cachyos-bmq- Priority and Deadline based Skiplist multiple queue scheduler (PDS) - Alfred Chen Scheduler » linux-cachyos-pds-- Task Type Scheduler by Hamad Marri (TT) - linux-cachyos-tt+- Task Type Scheduler by [Hamad Marri (TT)](https://github.com/hamadmarri/TT-CPU-Scheduler) - linux-cachyos-tt- BORE (Burst-Oriented Response Enhancer) CPU Scheduler by [firelzrd (BORE)](https://github.com/firelzrd/bore-scheduler) - linux-cachyos-bore**All kernels are prebuilt in two different march versions (x86_64 and x86_64_v3) and also with the lto enabled kernels in the cachyos repo.**@@ -21,7 +21,7 @@ The CachyOS are improved kernels which improve the performance and other improve- Choose between LLVM/LTO or GCC- Choose between 500Hz, , 600 Hz ,750Hz, 1000Hz- Improved BFQ Scheduler-- Generell improved ssctl settings and upstream scheduler fixes+- General improved sysctl settings and upstream scheduler fixes- Latest LRU Patch-set- BBRv2 tcp_congestion_control- LLVM ThinLTO provided with \*-lto Kernel (in the cachyos-repo)@@ -33,7 +33,7 @@ The CachyOS are improved kernels which improve the performance and other improve- Some Security related patches. More here: [Fork-Brute](https://github.com/ptr1337/kernel-patches/blob/master/5.15/0001-security-patches.patch) [spectre](https://github.com/ptr1337/kernel-patches/blob/master/5.15/0001-spectre-patches.patch)- Latest BTRFS improvements & fixes- KSMBD Module for Samba3 Server-- Using the lates MG-LRU v5 patch paired with and the new implemented damon. The damon is disabled at default, but can be enabled in the PKGBUILD+- Using the latest MG-LRU v5 patch paired with and the new implemented damon. The damon is disabled at default, but can be enabled in the PKGBUILD- AMD PSTATEv7 Driver- Clearlinux Patchset- Control Flow Integrity (CFI) slectable when using LLVM@@ -75,7 +75,7 @@ net.ipv4.tcp_congestion_control = bbr2## We are providing a [repo](https://mirror.cachyos.org/) which includes all kernels in generic-v3 and generic and more optimized packages-### How to add our Repo automatically with CPU detection (if x86-64-v3 is supported)+### How to add our repo automatically with CPU detection (if x86-64-v3 is supported)**Just run following command:**diff --git a/linux-bore/PKGBUILD b/linux-bore/PKGBUILDindex d572fa26..93764e19 100644--- a/linux-bore/PKGBUILD+++ b/linux-bore/PKGBUILD@@ -122,7 +122,7 @@ elsepkgbase=linux-borefi_major=5.15-_minor=12+_minor=13pkgver=${_major}.${_minor}_srcname=linux-${pkgver}arch=(x86_64 x86_64_v3)diff --git a/linux-cachyos-bmq/PKGBUILD b/linux-cachyos-bmq/PKGBUILDindex 083f2eaf..56a26420 100644--- a/linux-cachyos-bmq/PKGBUILD+++ b/linux-cachyos-bmq/PKGBUILD@@ -122,7 +122,7 @@ elsepkgbase=linux-cachyos-bmqfi_major=5.15-_minor=12+_minor=13pkgver=${_major}.${_minor}_srcname=linux-${pkgver}arch=(x86_64 x86_64_v3)diff --git a/linux-cachyos-bore/PKGBUILD b/linux-cachyos-bore/PKGBUILDindex 83242295..edc80b9c 100644--- a/linux-cachyos-bore/PKGBUILD+++ b/linux-cachyos-bore/PKGBUILD@@ -34,7 +34,7 @@ _NUMAdisable=y# This PKGBUILD read the database kept if it exists## More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db-_localmodcfg=+_localmodcfg=y# Use the current kernel's .config file# Enabling this option will use the .config of the RUNNING kernel rather than@@ -107,7 +107,7 @@ _zstd_module_level='normal'_fork_brute=## Enable it for compiling with LLVM and THINLTO-_use_llvm_lto=+_use_llvm_lto=y# Enable it for using the LLVM CFI PATCH for a better security_use_cfi=@@ -128,7 +128,7 @@ _srcname=linux-${pkgver}arch=(x86_64 x86_64_v3)pkgdesc='Linux BORE scheduler Kernel by CachyOS and with some other patches and other improvements'_srcname=linux-${pkgver}-pkgrel=1+pkgrel=2arch=('x86_64' 'x86_64_v3')url="https://github.com/CachyOS/linux-cachyos"license=('GPL2')diff --git a/linux-cachyos-bore/config b/linux-cachyos-bore/configindex f5f16479..14f095ac 100644--- a/linux-cachyos-bore/config+++ b/linux-cachyos-bore/config@@ -231,6 +231,7 @@ CONFIG_PID_NS=yCONFIG_NET_NS=yCONFIG_CHECKPOINT_RESTORE=yCONFIG_SCHED_AUTOGROUP=y+CONFIG_AUTOGROUP_ENABLED_DEFAULT=y# CONFIG_SYSFS_DEPRECATED is not setCONFIG_RELAY=yCONFIG_BLK_DEV_INITRD=ydiff --git a/linux-cachyos-cacule/PKGBUILD b/linux-cachyos-cacule/PKGBUILDindex 38c36765..fbd7c44b 100644--- a/linux-cachyos-cacule/PKGBUILD+++ b/linux-cachyos-cacule/PKGBUILD@@ -122,7 +122,7 @@ elsepkgbase=linux-cachyos-caculefi_major=5.15-_minor=12+_minor=13pkgver=${_major}.${_minor}_srcname=linux-${pkgver}arch=(x86_64 x86_64_v3)diff --git a/linux-cachyos-pds/PKGBUILD b/linux-cachyos-pds/PKGBUILDindex 1a0a03a3..79dba63f 100644--- a/linux-cachyos-pds/PKGBUILD+++ b/linux-cachyos-pds/PKGBUILD@@ -122,7 +122,7 @@ elsepkgbase=linux-cachyos-pdsfi_major=5.15-_minor=12+_minor=13pkgver=${_major}.${_minor}_srcname=linux-${pkgver}arch=(x86_64 x86_64_v3)diff --git a/linux-cachyos-rc/.SRCINFO b/linux-cachyos-rc/.SRCINFOindex e20719ce..1e2d0569 100644--- a/linux-cachyos-rc/.SRCINFO+++ b/linux-cachyos-rc/.SRCINFO@@ -1,8 +1,8 @@pkgbase = linux-cachyos-rc- pkgdesc = Linux-CachyOS Kernel-RC by Hamad Marri and with some other patchsets- pkgver = 5.16.0- pkgrel = 2- url = https://github.com/cachyos/linux-cachyos+ pkgdesc = Linux CacULE scheduler Kernel by CachyOS and with some other patches and other improvements+ pkgver = 5.16.+ pkgrel = 0.1+ url = https://github.com/CachyOS/linux-cachyosarch = x86_64arch = x86_64_v3license = GPL2@@ -19,17 +19,17 @@ pkgbase = linux-cachyos-rcmakedepends = tarmakedepends = xzoptions = !strip- source = https://git.kernel.org/torvalds/t/linux-5.16-rc7.tar.gz+ source = https://git.kernel.org/torvalds/t/linux-5.16-rc8.tar.gzsource = config- source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-bore-sched.patch- source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-block-perf.patch- source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-amdpstate.patch- source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-pte-marker.patchsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-sched-perf-fix.patch- source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-page-table-check.patch+ source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-amdpstate.patch+ source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-anbox.patchsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-bbr2.patchsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-lrng.patchsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-cpu.patch+ source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-MG-LRU-v6.patch+ source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-lru-draining.patch+ source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-page-table-check.patchsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-clearlinux.patchsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-misc.patchsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-fixes.patch@@ -37,39 +37,39 @@ pkgbase = linux-cachyos-rcsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-hwmon.patchsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-zstd-patches.patchsource = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-zen-patches.patch- source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16/0001-v4l2loopback.patchsource = auto-cpu-optimization.sh- md5sums = ce9f9c812f847ff18494f4e3cddf4505+ md5sums = 1f4cd3c97d5a0049e9de9202a005ff12md5sums = 9cc698af4174326d44e8c8fda942c4d2- md5sums = 7c16734e93e8f371441ea1844736a02a- md5sums = fa93f9a728a712cf5f73181ec971d3d4- md5sums = ef446a32fe115b59710a122009bb1d49- md5sums = d98c7ebc9432a24724b10416e3103540md5sums = 1262001a6a1e72fa271481cf897ac6d1- md5sums = 7d28f804d6b74f9a22ad30d67af5a669- md5sums = 621bd031ffb6ce291b26e15bbf7e0aeb- md5sums = 978153c745ba777574ad6689a0c9f283+ md5sums = 9ce207e47ad186b612050bd83641a697+ md5sums = 80e419d6847d4122a23a141fd3a40e52+ md5sums = cced4f2ea452c03e74a6bbbb4a9768d7+ md5sums = 9f86c3b9e6271cfc4440864a6857b256md5sums = d4c38ce51fb9a69aa92ad9b9e0199122+ md5sums = 94f01559d149c8094c18de15d04ecac8+ md5sums = e418b4d90901e1c01c14f89d22c60886+ md5sums = 7d28f804d6b74f9a22ad30d67af5a669md5sums = d78bb31569440421e0e76d9a8c0a14fc- md5sums = 2fdd66a2e6731a63cc34a9202e39d810+ md5sums = 9b09d8ca59023aba2065c52989e759aemd5sums = f574f1c40fa2d07602e77418b863e144md5sums = 2458d1c5d00d10709922e686c5d1e97fmd5sums = 2160aabf2b9798907d36c4d246937d71md5sums = bf58290793d3a095ef95fb1fac2de89amd5sums = de6db1147385c058b2e94df3c1739fdf- md5sums = cb9384ce179d08be6c90df6d0a0977a1md5sums = 21c98f19e883879dd3336c1fa143fd31pkgname = linux-cachyos-rc- pkgdesc = The Linux-CachyOS Kernel-RC by Hamad Marri and with some other patchsets kernel and modules+ pkgdesc = The Linux CacULE scheduler Kernel by CachyOS and with some other patches and other improvements kernel and modulesdepends = coreutilsdepends = kmoddepends = initramfsoptdepends = crda: to set the correct wireless channels of your countryoptdepends = linux-firmware: firmware images needed for some devicesoptdepends = modprobed-db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig+ provides = VIRTUALBOX-GUEST-MODULES+ provides = WIREGUARD-MODULEpkgname = linux-cachyos-rc-headers- pkgdesc = Headers and scripts for building modules for the Linux-CachyOS Kernel-RC by Hamad Marri and with some other patchsets kernel- depends = linux-cachyos-rc=5.16.0+ pkgdesc = Headers and scripts for building modules for the Linux CacULE scheduler Kernel by CachyOS and with some other patches and other improvements+ depends = linux-cachyos-rc=5.16.depends = paholediff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILDindex de7af8e7..1ee10502 100644--- a/linux-cachyos-rc/PKGBUILD+++ b/linux-cachyos-rc/PKGBUILD@@ -1,24 +1,52 @@# Maintainer: Peter Jung ptr1337 <[email protected]>+# Contributor: Piotr Gorski <[email protected]>+# Contributor: Jan Alexander Steffens (heftig) <[email protected]>+# Contributor: Tobias Powalowski <[email protected]>+# Contributor: Thomas Baechler <[email protected]>++### Selecting the CPU scheduler+# ATTENTION - one of seven predefined values should be selected!+# 'bmq' - select 'BitMap Queue CPU scheduler'+# 'pds' - select 'Priority and Deadline based Skip list multiple queue CPU scheduler'+# 'cacule' - select 'CacULE scheduler'+# 'cacule-rdb' - select 'CacULE-RDB scheduler'+# 'bore' - select 'Burst-Oriented Response Enhancer'+# 'tt' - select 'Task Type Scheduler by Hamad Marri'+# 'cfs' - select 'Completely Fair Scheduler'+_cpusched='cfs'### BUILD OPTIONS-# Set the next two variables to ANYTHING that is not null to enable them+# Set these variables to ANYTHING that is not null to enable them-# Selecting CacULE or CacULE-RDB scheduler, default:cacule-#_cpusched='rdb'-#_cpusched='tt'+### Tweak kernel options prior to a build via nconfig+_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=y-# Enable fsync-_fsync=y++# Compile ONLY used modules to VASTLYreduce the number of modules built+# and the build time.+#+# To keep track of which modules are needed for your specific system/hardware,+# give module_db script a try: https://aur.archlinux.org/packages/modprobed-db+# This PKGBUILD read the database kept if it exists+#+# More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db+_localmodcfg=y++# Use the current kernel's .config file+# Enabling this option will use the .config of the RUNNING kernel rather than+# the ARCH defaults. Useful when the package gets updated and you already went+# through the trouble of customizing your config options. NOT recommended when+# a new kernel is released, but again, convenient for package bumps.+_use_current=#enable winesync_winesync=y-### Running with a 2000 HZ, 1000HZ, 750Hz or 500HZ tick rate-_2k_HZ_ticks=+### Running with a 1000HZ, 750Hz or 500HZ tick rate_1k_HZ_ticks=_750_HZ_ticks=y_600_HZ_ticks=@@ -31,22 +59,23 @@ _mq_deadline_disable=y_kyber_disable=y### Enable protect file mappings under memory pressure-_mm_protect=y+_mm_protect=### Enable multigenerational LRU_lru_enable=y-### Enable Linux Random Number Generator-_lrng_enable=y--## Samba3 Server-_ksmbd_enable=+## Enable Page-Table-Check+_page_table_check=y-# Tweak kernel options prior to a build via nconfig+### Enable DAMON+_damon=+### Enable Linux Random Number Generator+_lrng_enable=y## Apply Kernel automatic Optimization_use_auto_optimization=y+## Apply Kernel Optimization selecting_use_optimization_select=@@ -86,25 +115,6 @@ _use_cfi=## Enable PGO (patch is failing when cfi is also used)#_use_pgo=-# Only compile active modules to VASTLY reduce the number of modules built and-# the build time.-#-# To keep track of which modules are needed for your specific system/hardware,-# give module_db a try: https://aur.archlinux.org/packages/modprobed-db-# This PKGBUILD reads the database kept if it exists-#-# More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed-db-_localmodcfg=--# Use the current kernel's .config file-# Enabling this option will use the .config of the RUNNING kernel rather than-# the ARCH defaults. Useful when the package gets updated and you already went-# through the trouble of customizing your config options. NOT recommended when-# a new kernel is released, but again, convenient for package bumps.-_use_current=--# Tweak kernel options prior to a build via nconfig-_makenconfig=if [ -n "$_use_llvm_lto" ]; thenpkgbase=linux-cachyos-rc-lto@@ -112,41 +122,44 @@ elsepkgbase=linux-cachyos-rcfi_major=5.16-_minor=0+_minor=#_minorc=$((_minor+1))-_rcver=rc7+_rcver=rc8pkgver=${_major}.${_minor}_stable=${_major}.${_minor}_stablerc=${_major}-${_rcver}_srcname=linux-${_stablerc}-pkgrel=2-pkgdesc='Linux-CachyOS Kernel-RC by Hamad Marri and with some other patchsets'+arch=(x86_64 x86_64_v3)+pkgdesc='Linux CacULE scheduler Kernel by CachyOS and with some other patches and other improvements'+pkgrel=0.1arch=('x86_64' 'x86_64_v3')-url="https://github.com/cachyos/linux-cachyos"+url="https://github.com/CachyOS/linux-cachyos"license=('GPL2')options=('!strip')makedepends=('kmod' 'bc' 'libelf' 'python-sphinx' 'python-sphinx_rtd_theme''graphviz' 'imagemagick' 'pahole' 'cpio' 'perl' 'tar' 'xz')if [ -n "$_use_llvm_lto" ]; then- makedepends+=(clang llvm lld python)+ depends=(clang llvm lld python)fiif [ -n "$_use_llvm_lto" ]; then- depends+=(clang llvm lld python)+ makedepends+=(clang llvm lld python)fi-_caculepatches="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/CacULE"_patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.16"-source=("https://git.kernel.org/torvalds/t/linux-${_stablerc}.tar.gz"+source=(+ "https://git.kernel.org/torvalds/t/linux-${_stablerc}.tar.gz""config"- # "${_caculepatches}/v5.16/0001-cacULE-5.16-full.patch"- "${_patchsource}/0001-bore-sched.patch"- "${_patchsource}/0001-block-perf.patch"- "${_patchsource}/0001-amdpstate.patch"- "${_patchsource}/0001-pte-marker.patch"+ #"${_patchsource}/cacule/0001-cacULE-5.16-full.patch"+ #"${_patchsource}/sched/0001-bore-sched.patch"+# "${_patchsource}/0001-tt.patch""${_patchsource}/0001-sched-perf-fix.patch"- "${_patchsource}/0001-page-table-check.patch"+ "${_patchsource}/0001-amdpstate.patch"+ "${_patchsource}/0001-anbox.patch""${_patchsource}/0001-bbr2.patch""${_patchsource}/0001-lrng.patch""${_patchsource}/0001-cpu.patch"+ "${_patchsource}/0001-MG-LRU-v6.patch"+ "${_patchsource}/0001-lru-draining.patch"+ "${_patchsource}/0001-page-table-check.patch""${_patchsource}/0001-clearlinux.patch""${_patchsource}/0001-misc.patch""${_patchsource}/0001-fixes.patch"@@ -154,9 +167,14 @@ source=("https://git.kernel.org/torvalds/t/linux-${_stablerc}.tar.gz""${_patchsource}/0001-hwmon.patch""${_patchsource}/0001-zstd-patches.patch""${_patchsource}/0001-zen-patches.patch"- "${_patchsource}/0001-v4l2loopback.patch"+# "${_patchsource}/0001-v4l2loopback.patch""auto-cpu-optimization.sh")++#if [ -n "$_use_pgo" ]; then+# source+=("${_patchsource}/0001-PGO.patch")+#fi+if [ -n "$_use_llvm_lto" ]; thenLLVMOPTS="LLVM=1 LLVM_IAS=1"CLANGOPTS="CC=clang LD=ld.lld"@@ -170,13 +188,11 @@ export KBUILD_BUILD_USER=$pkgbaseexport KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"prepare() {- cd $_srcname-+ cd $_srcname### Setting versionecho "Setting version..."- sed -e "/^EXTRAVERSION =/s/=.*/=/" -i Makefilescripts/setlocalversion --save-scmversionecho "-$pkgrel" > localversion.10-pkgrelecho "${pkgbase#linux}" > localversion.20-pkgname@@ -196,15 +212,90 @@ prepare() {cp ../config .config+ ### Optionally use running kernel's config+ # code originally by nous; http://aur.archlinux.org/packages.php?ID=40191+ if [ -n "$_use_current" ]; then+ if [[ -s /proc/config.gz ]]; then+ echo "Extracting config from /proc/config.gz..."+ # modprobe configs+ zcat /proc/config.gz > ./.config+ else+ warning "Your kernel was not compiled with IKCONFIG_PROC!"+ warning "You cannot read the current config!"+ warning "Aborting!"+ exit+ fi+ fi+### Microarchitecture Optimization (GCC/CLANG)if [ -n "$_use_auto_optimization" ]; then"${srcdir}"/auto-cpu-optimization.shfi++if [ -n "$_use_optimization_select" ]; thensource "${startdir}"/configurecpu_archfi++ ### Selecting the CPU scheduler+ if [ "$_cpusched" = "bmq" ]; then+ echo "Selecting BMQ CPU scheduler..."+ scripts/config --enable CONFIG_SCHED_BMQ+ scripts/config --disable CONFIG_SCHED_PDS+ elif [ "$_cpusched" = "pds" ]; then+ echo "Selecting PDS CPU scheduler..."+ scripts/config --disable CONFIG_SCHED_BMQ+ scripts/config --enable CONFIG_SCHED_PDS+ elif [ "$_cpusched" = "cacule" ]; then+ echo "Selecting CacULE scheduler..."+ scripts/config --disable CONFIG_SCHED_ALT+ scripts/config --enable CONFIG_CACULE_SCHED+ elif [ "$_cpusched" = "cacule-rdb" ]; then+ echo "Selecting CacULE-RDB scheduler..."+ scripts/config --disable CONFIG_SCHED_ALT+ scripts/config --enable CONFIG_CACULE_SCHED+ scripts/config --enable CONFIG_CACULE_RDB+ scripts/config --set-val CONFIG_RDB_INTERVAL 19+ elif [ "$_cpusched" = "tt" ]; then+ echo "Enable TT CPU scheduler..."+ scripts/config --enable CONFIG_TT_SCHED+ scripts/config --enable CONFIG_TT_ACCOUNTING_STATS+ elif [ "$_cpusched" = "bore" ]; then+ echo "Selecting BORE Scheduler..."+ scripts/config --disable CONFIG_SCHED_ALT+ elif [ "$_cpusched" = "cfs" ]; then+ echo "Selecting Completely Fair Scheduler..."+ scripts/config --disable CONFIG_SCHED_ALT+ else+ if [ -n "$_cpusched" ]; then+ error "The value $_cpusched is invalid. Choose the correct one again."+ else+ error "The value is empty. Choose the correct one again."+ fi+ error "Selecting the CPU scheduler failed!"+ exit+ fi++scripts/config --enable CONFIG_FAST_HEADERS+ if [ -n "$_use_cfi" ] && [ -n "$_use_llvm_lto" ]; then+ echo "Enabling CFI"+ scripts/config --enable CONFIG_ARCH_SUPPORTS_CFI_CLANG+ scripts/config --enable CONFIG_CFI_CLANG+ fi++ if [ -n "$_use_llvm_lto" ]; then+ echo "Enable LLVM LTO"+ scripts/config --disable CONFIG_LTO_NONE+ fi++ # if [ -n "$_use_pgo" ]; then+ # scripts/config --enable CONFIG_ARCH_SUPPORTS_PGO_CLANG+ # scripts/config --enable DEBUG_FS+ # scripts/config --enable CONFIG_PGO_CLANG+ # fi+### Optionally set tickrate to 1000if [ -n "$_1k_HZ_ticks" ]; thenecho "Setting tick rate to 1k..."@@ -228,6 +319,7 @@ prepare() {scripts/config --enable CONFIG_HZ_600scripts/config --set-val CONFIG_HZ 600fi+### Optionally set tickrate to 500HZif [ -n "$_500_HZ_ticks" ]; thenecho "Setting tick rate to 500HZ..."@@ -243,12 +335,6 @@ prepare() {scripts/config --disable CONFIG_NUMAfi- if [ -n "$_fsync" ]; then- echo "Enable Fsync support"- scripts/config --enable CONFIG_FUTEX- scripts/config --enable CONFIG_FUTEX_PI- fi-if [ -n "$_winesync" ]; thenecho "Enable winesync support"scripts/config --module CONFIG_WINESYNC@@ -266,21 +352,27 @@ prepare() {scripts/config --disable CONFIG_MQ_IOSCHED_KYBERfi- ### Enable protect file mappings under memory pressure++ ### Enable protect mappings under memory pressureif [ -n "$_mm_protect" ]; thenecho "Enabling protect file mappings under memory pressure..."- scripts/config --enable CONFIG_UNEVICTABLE_FILE- scripts/config --set-val CONFIG_UNEVICTABLE_FILE_KBYTES_LOW 262144- scripts/config --set-val CONFIG_UNEVICTABLE_FILE_KBYTES_MIN 131072- scripts/config --enable CONFIG_UNEVICTABLE_ANON- scripts/config --set-val CONFIG_UNEVICTABLE_ANON_KBYTES_LOW 65536- scripts/config --set-val CONFIG_UNEVICTABLE_ANON_KBYTES_MIN 32768+ scripts/config --set-val CONFIG_ANON_MIN_KBYTES 0+ scripts/config --set-val CONFIG_CLEAN_LOW_KBYTES 524288+ scripts/config --set-val CONFIG_CLEAN_MIN_KBYTES 0+ fi++ ### Enable multigenerational LRU+ if [ -n "$_page_table_check" ]; then+ echo "Enabling Page-Table-Check..."+ scripts/config --enable CONFIG_PAGE_TABLE_CHECK+ scripts/config --enable CONFIG_PAGE_TABLE_CHECK_ENFORCED+ scripts/config --enable CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECKfi### Enable multigenerational LRUif [ -n "$_lru_enable" ]; thenecho "Enabling multigenerational LRU..."- scripts/config --enable CONFIG_HAVE_ARCH_PARENT_PMD_YOUNG+ scripts/config --enable CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNGscripts/config --enable CONFIG_LRU_GENscripts/config --set-val CONFIG_NR_LRU_GENS 7scripts/config --set-val CONFIG_TIERS_PER_GEN 4@@ -288,13 +380,25 @@ prepare() {scripts/config --disable CONFIG_LRU_GEN_STATSfi+ ### Enable DAMON+ if [ -n "$_damon" ]; then+ echo "Enabling DAMON..."+ scripts/config --enable CONFIG_DAMON+ scripts/config --disable CONFIG_DAMON_VADDR+ scripts/config --disable CONFIG_DAMON_DBGFS+ scripts/config --enable CONFIG_DAMON_PADDR+ scripts/config --enable CONFIG_DAMON_RECLAIM+ fi+### Enable Linux Random Number Generatorif [ -n "$_lrng_enable" ]; thenecho "Enabling Linux Random Number Generator ..."+ echo "Enabling Linux Random Number Generator with pfkernel config..."scripts/config --enable CONFIG_LRNGscripts/config --enable CONFIG_LRNG_OVERSAMPLE_ENTROPY_SOURCESscripts/config --set-val CONFIG_CONFIG_LRNG_OVERSAMPLE_ES_BITS 64scripts/config --set-val CONFIG_LRNG_SEED_BUFFER_INIT_ADD_BITS 128+ scripts/config --enable CONFIG_LRNG_IRQscripts/config --enable CONFIG_LRNG_CONTINUOUS_COMPRESSION_ENABLEDscripts/config --disable CONFIG_LRNG_CONTINUOUS_COMPRESSION_DISABLEDscripts/config --enable CONFIG_LRNG_ENABLE_CONTINUOUS_COMPRESSION@@ -311,6 +415,7 @@ prepare() {scripts/config --set-val CONFIG_LRNG_IRQ_ENTROPY_RATE 256scripts/config --enable CONFIG_LRNG_JENTscripts/config --set-val CONFIG_LRNG_JENT_ENTROPY_RATE 16+ scripts/config --enable CONFIG_LRNG_CPUscripts/config --set-val CONFIG_LRNG_CPU_ENTROPY_RATE 8scripts/config --enable CONFIG_LRNG_DRNG_SWITCHscripts/config --enable CONFIG_LRNG_KCAPI_HASH@@ -328,33 +433,10 @@ prepare() {scripts/config --disable CONFIG_LRNG_ACVT_HASHscripts/config --enable CONFIG_LRNG_RUNTIME_ES_CONFIGscripts/config --disable CONFIG_LRNG_RUNTIME_MAX_WO_RESEED_CONFIG+ scripts/config --disable CONFIG_LRNG_TEST_CPU_ES_COMPRESSIONscripts/config --enable CONFIG_LRNG_SELFTESTscripts/config --disable CONFIG_LRNG_SELFTEST_PANICfi- echo "Enable LLVM LTO"- if [ -n "$_use_llvm_lto" ]; then- scripts/config --disable CONFIG_LTO_NONE- fi- if [ "$_cpusched" = "cacule" ]; then- echo "Selecting CacULE scheduler..."- scripts/config --enable CONFIG_CACULE_SCHED- scripts/config --disable CONFIG_CACULE_RDB- fi- if [ "$_cpusched" = "rdb" ]; then- echo "Enabling CacULE-RDB scheduler..."- scripts/config --enable CONFIG_CACULE_SCHED- scripts/config --enable CONFIG_CACULE_RDB- scripts/config --set-val CONFIG_RDB_INTERVAL 19- fi-- ### Enable SMB3 Kernel Server- if [ -n "$_ksmbd_enable" ]; then- echo "Enabling SMB3 Kernel Server..."- scripts/config --module CONFIG_SMB_SERVER- scripts/config --enable CONFIG_SMB_SERVER_SMBDIRECT- scripts/config --enable CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN- scripts/config --enable CONFIG_SMB_SERVER_KERBEROS5- fi### Selecting the ZSTD compression levelif [ "$_zstd_level" = "ultra" ]; then@@ -378,7 +460,6 @@ prepare() {### Selecting the ZSTD module compression levelif [ "$_zstd_module_level" = "ultra" ]; thenecho "Enabling highest ZSTD module compression ratio..."- scripts/config --enable CONFIG_MODULE_COMPRESS_ZSTDscripts/config --set-val CONFIG_MODULE_COMPRESS_ZSTD_LEVEL 19scripts/config --enable CONFIG_MODULE_COMPRESS_ZSTD_ULTRAscripts/config --set-val CONFIG_MODULE_COMPRESS_ZSTD_LEVEL_ULTRA 22@@ -403,42 +484,51 @@ prepare() {scripts/config --enable CONFIG_TCP_CONG_BBR2scripts/config --enable CONFIG_DEFAULT_BBR2scripts/config --set-str CONFIG_DEFAULT_TCP_CONG bbr2+ echo "Setting performance governor..."+ scripts/config --disable CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL+ scripts/config --enable CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE+ scripts/config --enable CONFIG_CPU_FREQ_GOV_ONDEMAND+ scripts/config --enable CONFIG_CPU_FREQ_GOV_PERFORMANCE+ scripts/config --enable CONFIG_CPU_FREQ_GOV_CONSERVATIVE+ scripts/config --enable CONFIG_CPU_FREQ_GOV_USERSPACE+ scripts/config --enable CONFIG_CPU_FREQ_GOV_SCHEDUTILecho "Enable AMD PSTATE driver"scripts/config --enable CONFIG_X86_AMD_PSTATE+ scripts/config --enable CONFIG_AMD_PTDMA+ echo "Enable Anbox"+ scripts/config --enable CONFIG_ASHMEM+ scripts/config --enable CONFIG_ANDROID+ scripts/config --enable CONFIG_ANDROID_BINDER_IPC+ scripts/config --enable CONFIG_ANDROID_BINDERFS+ scripts/config --enable CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"+ scripts/config --enable CONFIG_NTFS3_FS+ echo "Enabling KBUILD_CFLAGS -O3..."+ scripts/config --disable CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE+ scripts/config --enable CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3+ scripts/config --module CONFIG_IP_NF_TARGET_FULLCONENAT+ scripts/config --module CONFIG_NETFILTER_XT_TARGET_FULLCONENAT- ### Optionally use running kernel's config- # code originally by nous; http://aur.archlinux.org/packages.php?ID=40191- if [ -n "$_use_current" ]; then- if [[ -s /proc/config.gz ]]; then- echo "Extracting config from /proc/config.gz..."- # modprobe configs- zcat /proc/config.gz > ./.config- else- warning "Your kernel was not compiled with IKCONFIG_PROC!"- warning "You cannot read the current config!"- warning "Aborting!"- exit- fi- fi### Optionally load needed modules for the make localmodconfig# See https://aur.archlinux.org/packages/modprobed-dbif [ -n "$_localmodcfg" ]; then- if [ -e $HOME/.config/modprobed.db ]; then+ if [ -f $HOME/.config/modprobed.db ]; thenecho "Running Steven Rostedt's make localmodconfig now"- make $LLVMOPTS LSMOD=$HOME/.config/modprobed.db localmodconfig+ make $LLVMOPTS LSMOD=$HOME/.config/modprobed.db localmodconfigelseecho "No modprobed.db data found"exitfifi- make $LLVMOPTS olddefconfig+ echo "Applying default config..."+ make $LLVMOPTS olddefconfigmake $LLVMOPTS -s kernelrelease > versionecho "Prepared $pkgbase version $(<version)"- [[ -z "$_makenconfig" ]] || make $LLVMOPTS nconfig+ ### Running make nconfig+ [[ -z "$_makenconfig" ]] || make $LLVMOPTS nconfig### Save configuration for later reusecp -Tf ./.config "${startdir}/config-${pkgver}-${pkgrel}${pkgbase#linux}"@@ -446,6 +536,7 @@ prepare() {}build() {+cd $_srcnamemake $LLVMOPTS -j$(nproc) all@@ -457,7 +548,7 @@ _package() {optdepends=('crda: to set the correct wireless channels of your country''linux-firmware: firmware images needed for some devices''modprobed-db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')-+ provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE)cd $_srcnamelocal kernver="$(<version)"@@ -476,10 +567,11 @@ _package() {# remove build and source linksrm "$modulesdir"/{source,build}+}_package-headers() {- pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"+ pkgdesc="Headers and scripts for building modules for the ${pkgdesc}"depends=("${pkgbase}=${pkgver}" "pahole")cd $_srcname@@ -497,7 +589,9 @@ _package-headers() {# add xfs and shmem for aufs buildingmkdir -p "$builddir"/{fs/xfs,mm}+install -Dt "$builddir"/tools/bpf/resolve_btfids tools/bpf/resolve_btfids/resolve_btfids+echo "Installing headers..."cp -t "$builddir" -a includecp -t "$builddir/arch/x86" -a arch/x86/include@@ -506,14 +600,17 @@ _package-headers() {install -Dt "$builddir/drivers/md" -m644 drivers/md/*.hinstall -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h- # http://bugs.archlinux.org/task/13146+ # https://bugs.archlinux.org/task/13146install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h- # http://bugs.archlinux.org/task/20402+ # https://bugs.archlinux.org/task/20402install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.hinstall -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.hinstall -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h+ # https://bugs.archlinux.org/task/71392+ install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h+echo "Installing KConfig files..."find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;@@ -555,34 +652,35 @@ _package-headers() {echo "Adding symlink..."mkdir -p "$pkgdir/usr/src"ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"+}+pkgname=("$pkgbase" "$pkgbase-headers")for _p in "${pkgname[@]}"; doeval "package_$_p() {- $(declare -f "_package${_p#$pkgbase}")- _package${_p#$pkgbase}+ $(declare -f "_package${_p#$pkgbase}")+ _package${_p#$pkgbase}}"done-md5sums=('ce9f9c812f847ff18494f4e3cddf4505'+md5sums=('1f4cd3c97d5a0049e9de9202a005ff12''9cc698af4174326d44e8c8fda942c4d2'- '7c16734e93e8f371441ea1844736a02a'- 'fa93f9a728a712cf5f73181ec971d3d4'- 'ef446a32fe115b59710a122009bb1d49'- 'd98c7ebc9432a24724b10416e3103540''1262001a6a1e72fa271481cf897ac6d1'- '7d28f804d6b74f9a22ad30d67af5a669'- '621bd031ffb6ce291b26e15bbf7e0aeb'- '978153c745ba777574ad6689a0c9f283'+ '9ce207e47ad186b612050bd83641a697'+ '80e419d6847d4122a23a141fd3a40e52'+ 'cced4f2ea452c03e74a6bbbb4a9768d7'+ '9f86c3b9e6271cfc4440864a6857b256''d4c38ce51fb9a69aa92ad9b9e0199122'+ '94f01559d149c8094c18de15d04ecac8'+ 'e418b4d90901e1c01c14f89d22c60886'+ '7d28f804d6b74f9a22ad30d67af5a669''d78bb31569440421e0e76d9a8c0a14fc'- '2fdd66a2e6731a63cc34a9202e39d810'+ '9b09d8ca59023aba2065c52989e759ae''f574f1c40fa2d07602e77418b863e144''2458d1c5d00d10709922e686c5d1e97f''2160aabf2b9798907d36c4d246937d71''bf58290793d3a095ef95fb1fac2de89a''de6db1147385c058b2e94df3c1739fdf'- 'cb9384ce179d08be6c90df6d0a0977a1''21c98f19e883879dd3336c1fa143fd31')diff --git a/linux-cachyos-rt/PKGBUILD b/linux-cachyos-rt/PKGBUILDindex 25b8447c..9bcc2e72 100644--- a/linux-cachyos-rt/PKGBUILD+++ b/linux-cachyos-rt/PKGBUILD@@ -110,7 +110,7 @@ if [ -n "$_use_llvm_lto" ]; thenelsepkgbase=linux-cachyos-rtfi-pkgver=5.15.11+pkgver=5.15.13pkgrel=1arch=(x86_64 x86_64_v3)pkgdesc='Linux-cacule Kernel by CachyOS and with some other patches and other improvements'@@ -128,7 +128,7 @@ _caculepatches="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/_patchsource="https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15"source=("https://cdn.kernel.org/pub/linux/kernel/v${pkgver:0:1}.x/linux-${pkgver}.tar.xz""config"- "${_patchsource}/0001-5.15.10-rt24.patch"+ "${_patchsource}/0001-rt.patch""${_patchsource}/arch-patches/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch""${_patchsource}/0001-misc.patch""${_patchsource}/AMD/0001-amd64-patches.patch"diff --git a/linux-cachyos-tt/PKGBUILD b/linux-cachyos-tt/PKGBUILDindex fcfe3b3a..60962d9d 100644--- a/linux-cachyos-tt/PKGBUILD+++ b/linux-cachyos-tt/PKGBUILD@@ -122,7 +122,7 @@ elsepkgbase=linux-cachyos-ttfi_major=5.15-_minor=12+_minor=13pkgver=${_major}.${_minor}_srcname=linux-${pkgver}arch=(x86_64 x86_64_v3)diff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILDindex c3ec8753..d4a9f7e9 100755--- a/linux-cachyos/PKGBUILD+++ b/linux-cachyos/PKGBUILD@@ -84,7 +84,7 @@ _use_optimization_select=# ATTENTION - one of two predefined values should be selected!# 'ultra' - highest compression ratio# 'normal' - standard compression ratio-_zstd_level='normal'+_zstd_level='ultra'### Selecting the ZSTD module compression level# If you want to use ZSTD compression,diff --git a/linux-cacule-rdb/PKGBUILD b/linux-cacule-rdb/PKGBUILDindex 68b2a902..1bf29dc4 100644--- a/linux-cacule-rdb/PKGBUILD+++ b/linux-cacule-rdb/PKGBUILD@@ -122,7 +122,7 @@ elsepkgbase=linux-cacule-rdbfi_major=5.15-_minor=12+_minor=13pkgver=${_major}.${_minor}_srcname=linux-${pkgver}arch=(x86_64 x86_64_v3)diff --git a/linux-cacule/PKGBUILD b/linux-cacule/PKGBUILDindex b49bf29f..b265c1a6 100644--- a/linux-cacule/PKGBUILD+++ b/linux-cacule/PKGBUILD@@ -122,7 +122,7 @@ elsepkgbase=linux-caculefi_major=5.15-_minor=12+_minor=13pkgver=${_major}.${_minor}_srcname=linux-${pkgver}arch=(x86_64 x86_64_v3)diff --git a/linux-tt/PKGBUILD b/linux-tt/PKGBUILDindex f5c35a45..951eed7e 100644--- a/linux-tt/PKGBUILD+++ b/linux-tt/PKGBUILD@@ -122,7 +122,7 @@ elsepkgbase=linux-ttfi_major=5.15-_minor=12+_minor=13pkgver=${_major}.${_minor}_srcname=linux-${pkgver}arch=(x86_64 x86_64_v3)diff --git a/script.sh b/script.shindex faad7264..8f6669fd 100755--- a/script.sh+++ b/script.sh@@ -9,7 +9,7 @@ dod=$(dirname $f)cd $d- docker run --name dockerbuild -e EXPORT_PKG=1 -v $PWD:/pkg -v /home/ptr1337/buildcache:/home/notroot/.buildcache pttrr/docker-makepkg+ docker run --name dockerbuild -e EXPORT_PKG=1 -v $PWD:/pkg -v /home/ptr1337/ccache:/home/notroot/ccache pttrr/docker-makepkgdocker rm dockerbuildcd ..done@@ -25,7 +25,7 @@ dod=$(dirname $f)cd $d- docker run --name dockerbuild -e EXPORT_PKG=1 -v $PWD:/pkg -v /home/ptr1337/buildcache:/home/notroot/.buildcache pttrr/docker-makepkg-v3+ docker run --name dockerbuild -e EXPORT_PKG=1 -v $PWD:/pkg -v /home/ptr1337/ccache:/home/notroot/ccache pttrr/docker-makepkg-v3docker rm dockerbuildcd ..done@@ -43,7 +43,7 @@ for f in $filesdod=$(dirname $f)cd $d- docker run --name dockerbuild -e EXPORT_PKG=1 -v $PWD:/pkg -v /home/ptr1337/buildcache:/home/notroot/.buildcache pttrr/docker-makepkg-v3+ docker run --name dockerbuild -e EXPORT_PKG=1 -v $PWD:/pkg -v /home/ptr1337/ccache:/home/notroot/ccache pttrr/docker-makepkg-v3docker rm dockerbuildcd ..done@@ -59,7 +59,7 @@ dod=$(dirname $f)cd $d- docker run --name dockerbuild -e EXPORT_PKG=1 -v $PWD:/pkg -v /home/ptr1337/buildcache:/home/notroot/.buildcache pttrr/docker-makepkg+ docker run --name dockerbuild -e EXPORT_PKG=1 -v $PWD:/pkg -v /home/ptr1337/ccache:/home/notroot/ccache pttrr/docker-makepkgdocker rm dockerbuildcd ..done