From 9fd480c78dfcfcae39cd4ea8cbcdffb576360e81 Mon Sep 17 00:00:00 2001 From: "P. Jung" Date: Wed, 29 Dec 2021 19:23:50 +0000 Subject: [PATCH] 5.15.12-1 --- .SRCINFO | 45 +- PKGBUILD | 210 ++--- config | 2301 ++++++++++++++++++++---------------------------------- 3 files changed, 990 insertions(+), 1566 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 1469396..18322a5 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ -pkgbase = linux-cachyos +pkgbase = linux-cachyos-cfs pkgdesc = Linux CFS scheduler Kernel by CachyOS and with some other patches and other improvements - pkgver = 5.15.11 - pkgrel = 2 + pkgver = 5.15.12 + pkgrel = 1 url = https://github.com/CachyOS/linux-cachyos arch = x86_64 arch = x86_64_v3 @@ -19,7 +19,7 @@ pkgbase = linux-cachyos makedepends = tar makedepends = xz options = !strip - source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.11.tar.xz + source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.12.tar.xz source = config source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-arch-patches.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-cfi.patch @@ -35,7 +35,6 @@ pkgbase = linux-cachyos source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-clearlinux-patches.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-intel-patches.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-ntfs3.patch - source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-ck-hrtimer.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-fixes-miscellaneous.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-futex-wait.v-fsync-winesync.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-hwmon-patches.patch @@ -47,47 +46,45 @@ pkgbase = linux-cachyos source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-v4l2loopback.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-security-patches.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-spectre-patches.patch - source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-sbitmap-patches.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-xanmod-patches.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-net-patches.patch + source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-sbitmap-patches.patch source = https://raw.githubusercontent.com/ptr1337/kernel-patches/master/5.15/0001-zstd.patch source = auto-cpu-optimization.sh - md5sums = 7fcbea316f8439d092040996295c8f9d - md5sums = b1674b6cc65f404efb6a5dd6bf46ec68 - md5sums = 2627c6fcd9760b0e7a3553500db0a7e1 + md5sums = 7c3faf14ec344d6d0219b6a8b2475726 + md5sums = 788dcd568f1c00441ad9746706e4f1bc + md5sums = ef9fa3407854cea8e78112c25bb72e41 md5sums = e3fa8507aed6ef3ce37e62f18fe9b7e1 - md5sums = 4bfca774a71e7228f5b8bb31660521af - md5sums = 3aaa8d1bc993d4173aa1bb79ade16fb7 + md5sums = 1f3becd94390729d940a60b1e9b872b1 + md5sums = ef446a32fe115b59710a122009bb1d49 md5sums = dccfe71705b24d3fb1f51aaf2016216d md5sums = 53f037488a66667220c263f92ded333d md5sums = 2a8097ba46be56fbbe3967e9c34c9a0b - md5sums = a05b47e1970509a27f36501534751a9b md5sums = 56ceaed8bfb44eca93298ccc5fe11ca7 md5sums = 67764a5824b567b49bcce19c01d4e1b3 - md5sums = 299b176cbfc1b386d74406387e9e2d6b - md5sums = 70be88d96e0bc9e72759bf3902e7eb53 + md5sums = 018c728c9e744a99bb9b589028b8a1f6 + md5sums = a5de61b14e9ff7bfb4cb6548b6ee1c93 md5sums = 41887f2f959068e41756f4c39671ca79 md5sums = b04c8a3f01b3dfba1410e2c26ec7d975 md5sums = 8cf507777e20cd4d75a0627eef10c10d - md5sums = 6038177c72982533035309fcd6df208a md5sums = 8bda7327ae759b1b52e3b617952bd964 md5sums = 8c354c3d1962ec6785db7f0c3fbbab03 - md5sums = 349c88a39ec553aa3c9caf886b44c7ab - md5sums = 480c6bb9db4842114787f66ad5a68404 + md5sums = b6b2c2c6b4761aa5a8dea6ac0add8736 + md5sums = 265ac5714001f018c5bc7f99637c5181 md5sums = 08c84362cb916b30d9c77e35b1b3bc54 + md5sums = 7d28f804d6b74f9a22ad30d67af5a669 md5sums = 56fdf3562b041c0408d9751b7e447977 md5sums = b09b84168822521426f197610727618b md5sums = d9a892f66631615a72bdc93ee7397afa md5sums = bc64b1d1a9c95b07c28457f7214ebf81 md5sums = 8d390345afa36c56fa15bf4f4edad9a2 - md5sums = 7530840f2eb439f64307dd3157beb28e md5sums = 102fd2533e85eaecb4255df77d3e2901 - md5sums = 0153cfcb6feab5a108c269fff9f47cb3 - md5sums = 8a7c7cf90dcad3f655491b21c35f36b3 - md5sums = adfbf046639eb80e94769c4f4d0bc478 + md5sums = 03bb361f5f900cc9fd1159eda5e4f0ff + md5sums = 7530840f2eb439f64307dd3157beb28e + md5sums = 940d98858e6e59ecc07da50e05f6bc3d md5sums = 21c98f19e883879dd3336c1fa143fd31 -pkgname = linux-cachyos +pkgname = linux-cachyos-cfs pkgdesc = The Linux CFS scheduler Kernel by CachyOS and with some other patches and other improvements kernel and modules depends = coreutils depends = kmod @@ -98,7 +95,7 @@ pkgname = linux-cachyos provides = VIRTUALBOX-GUEST-MODULES provides = WIREGUARD-MODULE -pkgname = linux-cachyos-headers +pkgname = linux-cachyos-cfs-headers pkgdesc = Headers and scripts for building modules for the Linux CFS scheduler Kernel by CachyOS and with some other patches and other improvements - depends = linux-cachyos=5.15.11 + depends = linux-cachyos-cfs=5.15.12 depends = pahole diff --git a/PKGBUILD b/PKGBUILD index c7ad048..6f9860e 100755 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,28 +1,30 @@ # Maintainer: Peter Jung ptr1337 -# Maintainer: Piotr Gorski +# Contributor: Piotr Gorski # Contributor: Jan Alexander Steffens (heftig) # Contributor: Tobias Powalowski # Contributor: Thomas Baechler +### 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 these variables to ANYTHING that is not null to enable them ### Tweak kernel options prior to a build via nconfig _makenconfig= -### Tweak kernel options prior to a build via menuconfig -_makemenuconfig= - -### Tweak kernel options prior to a build via xconfig -_makexconfig= - -### Tweak kernel options prior to a build via gconfig -_makegconfig= - # 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. @@ -41,10 +43,6 @@ _localmodcfg= # a new kernel is released, but again, convenient for package bumps. _use_current= - -# Enable fsync -_fsync=y - #enable winesync _winesync=y @@ -66,15 +64,12 @@ _mm_protect=y ### Enable multigenerational LRU _lru_enable=y +## Enable Page-Table-Check +_page_table_check=y + ### Enable DAMON _damon= -# experimental; -# User Managed Concurrency Groups is an M:N threading toolkit that allows -# constructing user space schedulers designed to efficiently manage -# heterogeneous in-process workloads while maintaining high CPU -# utilization (95%+). -#_enable_umcg= ### Enable Linux Random Number Generator _lrng_enable=y @@ -89,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='ultra' +_zstd_level='normal' ### Selecting the ZSTD module compression level # If you want to use ZSTD compression, @@ -122,29 +117,33 @@ _use_cfi= if [ -n "$_use_llvm_lto" ]; then - pkgbase=linux-cachyos-lto + pkgbase=linux-cachyos-cfs-lto else - pkgbase=linux-cachyos + pkgbase=linux-cachyos-cfs fi _major=5.15 -_minor=11 +_minor=12 pkgver=${_major}.${_minor} _srcname=linux-${pkgver} arch=(x86_64 x86_64_v3) pkgdesc='Linux CFS scheduler Kernel by CachyOS and with some other patches and other improvements' _srcname=linux-${pkgver} -pkgrel=2 +pkgrel=1 arch=('x86_64' 'x86_64_v3') 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 + depends=(clang llvm lld python) +fi if [ -n "$_use_llvm_lto" ]; then 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.15" -source=(#"https://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz" +source=( "https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.xz" "config" "${_patchsource}/0001-arch-patches.patch" @@ -161,7 +160,6 @@ source=(#"https://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz" "${_patchsource}/0001-clearlinux-patches.patch" "${_patchsource}/0001-intel-patches.patch" "${_patchsource}/0001-ntfs3.patch" - "${_patchsource}/0001-ck-hrtimer.patch" "${_patchsource}/0001-fixes-miscellaneous.patch" "${_patchsource}/0001-futex-wait.v-fsync-winesync.patch" "${_patchsource}/0001-hwmon-patches.patch" @@ -173,16 +171,16 @@ source=(#"https://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz" "${_patchsource}/0001-v4l2loopback.patch" "${_patchsource}/0001-security-patches.patch" "${_patchsource}/0001-spectre-patches.patch" - "${_patchsource}/0001-sbitmap-patches.patch" "${_patchsource}/0001-xanmod-patches.patch" "${_patchsource}/0001-net-patches.patch" + "${_patchsource}/0001-sbitmap-patches.patch" "${_patchsource}/0001-zstd.patch" "auto-cpu-optimization.sh" ) -if [ -n "$_use_pgo" ]; then - source+=("${_patchsource}/0001-PGO.patch") -fi +#if [ -n "$_use_pgo" ]; then +# source+=("${_patchsource}/0001-PGO.patch") +#fi if [ -n "$_use_llvm_lto" ]; then LLVMOPTS="LLVM=1 LLVM_IAS=1" @@ -236,17 +234,6 @@ prepare() { fi fi - if [ -n "$_use_cfi" ] && [ -n "$_use_llvm_lto" ]; then - scripts/config --enable CONFIG_ARCH_SUPPORTS_CFI_CLANG - scripts/config --enable CONFIG_CFI_CLANG - 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 - ### Microarchitecture Optimization (GCC/CLANG) if [ -n "$_use_auto_optimization" ]; then "${srcdir}"/auto-cpu-optimization.sh @@ -258,6 +245,64 @@ prepare() { cpu_arch fi + + ### 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 + + + 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 1000 if [ -n "$_1k_HZ_ticks" ]; then echo "Setting tick rate to 1k..." @@ -297,13 +342,6 @@ prepare() { scripts/config --disable CONFIG_NUMA fi - if [ -n "$_fsync" ]; then - echo "Enable Fsync support" - scripts/config --enable CONFIG_FUTEX - scripts/config --enable CONFIG_FUTEX_PI - fi - - if [ -n "$_winesync" ]; then echo "Enable winesync support" scripts/config --module CONFIG_WINESYNC @@ -325,13 +363,17 @@ prepare() { ### Enable protect mappings under memory pressure if [ -n "$_mm_protect" ]; then echo "Enabling protect file mappings under memory pressure..." - scripts/config --enable CONFIG_UNEVICTABLE_FILE - scripts/config --set-val CONFIG_UNEVICTABLE_FILE_KBYTES_LOW 0 - scripts/config --set-val CONFIG_UNEVICTABLE_FILE_KBYTES_MIN 0 - echo "Enabling protect anonymous mappings under memory pressure..." - scripts/config --enable CONFIG_UNEVICTABLE_ANON - scripts/config --set-val CONFIG_UNEVICTABLE_ANON_KBYTES_LOW 0 - scripts/config --set-val CONFIG_UNEVICTABLE_ANON_KBYTES_MIN 0 + 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_CHECK fi ### Enable multigenerational LRU @@ -403,13 +445,6 @@ prepare() { scripts/config --disable CONFIG_LRNG_SELFTEST_PANIC fi - echo "Enable LLVM LTO" - if [ -n "$_use_llvm_lto" ]; then - scripts/config --disable CONFIG_LTO_NONE - fi - - - ### Selecting the ZSTD compression level if [ "$_zstd_level" = "ultra" ]; then echo "Enabling highest ZSTD compression ratio..." @@ -473,6 +508,12 @@ prepare() { 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 load needed modules for the make localmodconfig @@ -487,8 +528,8 @@ prepare() { fi fi - echo "Applying default config..." + make $LLVMOPTS olddefconfig make $LLVMOPTS -s kernelrelease > version echo "Prepared $pkgbase version $(