From 2d603642dab724bf2c059560ab0cf0bc0aa5b1bc Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Wed, 3 Nov 2021 13:27:24 +0100 Subject: [PATCH] Allow cacule CPU scheduler on 5.15+ through the CachyOS repo. hamadmarri's repo has gone unmaintained. We might drop the patchset down the line, but let's keep options for now. Thanks to @ptr1337 https://github.com/CachyOS/cacule-cpu-scheduler --- linux-tkg-config/prepare | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index d186512..588b7c4 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -135,7 +135,7 @@ _set_cpu_scheduler() { elif [ "$_basever" = "514" ]; then _avail_cpu_scheds=("pds" "bmq" "cacule" "cfs") elif [ "$_basever" = "515" ]; then - _avail_cpu_scheds=("pds" "bmq" "cfs") + _avail_cpu_scheds=("pds" "bmq" "cacule" "cfs") else _avail_cpu_scheds=("cfs") fi @@ -506,10 +506,18 @@ _tkg_srcprep() { elif [ "${_cpusched}" = "cacule" ]; then _msg="Applying cacule patch" if [ "${_distro}" = "Void" ]; then - wget -P "$wrksrc" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch" + if [[ $_basever < 515 ]]; then + wget -P "$wrksrc" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch" + else + wget -P "$wrksrc" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch" + fi tkgpatch="$wrksrc/cacule-${_basekernel}.patch" && _tkg_patcher else - wget -P "$srcdir" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch" + if [[ $_basever < 515 ]]; then + wget -P "$srcdir" "https://raw.githubusercontent.com/hamadmarri/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch" + else + wget -P "$srcdir" "https://raw.githubusercontent.com/CachyOS/cacule-cpu-scheduler/master/patches/CacULE/v${_basekernel}/cacule-${_basekernel}.patch" + fi tkgpatch="$srcdir/cacule-${_basekernel}.patch" && _tkg_patcher fi _msg="Applying Glitched CFS patch"