diff options
author | Peter Jung | 2022-04-20 20:38:03 +0000 |
---|---|---|
committer | Peter Jung | 2022-04-20 20:38:03 +0000 |
commit | d2e4ba152050520a447cc5864e6faee160bcbce8 (patch) | |
tree | 4238226a5fc94fcce25bd4dc64cbefec7e9fcabb | |
parent | 74a89f61758e762cfbdcf98975a4ba879df51de7 (diff) | |
download | aur-d2e4ba152050520a447cc5864e6faee160bcbce8.tar.gz |
5.17.4-2
-rwxr-xr-x | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 97 |
2 files changed, 78 insertions, 23 deletions
@@ -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 @@ -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') |