summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Gorski2023-02-01 15:05:36 +0100
committerPiotr Gorski2023-02-01 15:05:36 +0100
commitc755d7e2b649ee3709643e03917a48ef7b88f957 (patch)
tree473fe29a5355c4aa82b622e4e0429da476e8c5ac
parent923a914a356cf4bbae4bbb9c27ea82a756a2a94c (diff)
downloadaur-c755d7e2b649ee3709643e03917a48ef7b88f957.tar.gz
Sync with Github
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD133
2 files changed, 40 insertions, 95 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 09f4d0eb61f7..e0575108ff4c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-cachyos-rc
pkgdesc = Linux BORE scheduler Kernel by CachyOS and with some other patches and other improvements
pkgver = 6.2.rc6
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/CachyOS/linux-cachyos
arch = x86_64
arch = x86_64_v3
diff --git a/PKGBUILD b/PKGBUILD
index 9b9a75fdc95c..7cf631819ece 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,8 +13,6 @@ _cachy_config=${_cachy_config-'yes'}
# 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'
# 'cfs' - select 'Completely Fair Scheduler'
# 'tt' - select 'Task Type Scheduler by Hamad Marri'
@@ -210,7 +208,7 @@ _stable=${_major}-${_rcver}
_srcname=linux-${_stable}
#_srcname=linux-${_major}
pkgdesc='Linux BORE scheduler Kernel by CachyOS and with some other patches and other improvements'
-pkgrel=1
+pkgrel=2
_kernver=$pkgver-$pkgrel
arch=('x86_64' 'x86_64_v3')
url="https://github.com/CachyOS/linux-cachyos"
@@ -248,39 +246,20 @@ if [ -n "$_latency_nice" ]; then
source+=("${_patchsource}/misc/0001-Add-latency-priority-for-CFS-class.patch")
fi
fi
-## BMQ Scheduler
-if [ "$_cpusched" = "bmq" ]; then
- source+=("${_patchsource}/sched/0001-prjc-cachy.patch")
-fi
-## PDS Scheduler
-if [ "$_cpusched" = "pds" ]; then
- source+=("${_patchsource}/sched/0001-prjc-cachy.patch")
-fi
-## BORE Scheduler with latency_nice
-if [ "$_cpusched" = "bore" ]; then
- source+=("${_patchsource}/sched/0001-bore-cachy.patch")
-## BORE SYSCTL TUNING
- if [ -n "$_tune_bore" ]; then
- source+=("${_patchsource}/misc/0001-bore-tuning-sysctl.patch")
- fi
-fi
-## CacULE Scheduler
-if [ "$_cpusched" = "cacule" ]; then
- source+=("${_patchsource}/sched/0001-cacULE-cachy.patch")
-fi
-## CacULE-RDB Scheduler
-if [ "$_cpusched" = "cacule-rdb" ]; then
- source+=("${_patchsource}/sched/0001-cacULE-cachy.patch")
-fi
-## TT Scheduler
-if [ "$_cpusched" = "tt" ]; then
- source+=("${_patchsource}/sched/0001-tt-cachy.patch")
-fi
-## Hardened Patches with BORE Scheduler
-if [ "$_cpusched" = "hardened" ]; then
- source+=("${_patchsource}/sched/0001-bore-cachy.patch"
- "${_patchsource}/misc/0001-hardened.patch")
-fi
+
+case "$_cpusched" in
+ pds|bmq) # BMQ/PDS scheduler
+ source+=("${_patchsource}/sched/0001-prjc-cachy.patch");;
+ tt) ## TT Scheduler
+ source+=("${_patchsource}/sched/0001-tt-cachy.patch");;
+ bore) ## BORE Scheduler with latency_nice
+ [ -n "$_tune_bore" ] && source+=("${_patchsource}/misc/0001-bore-tuning-sysctl.patch")
+ source+=("${_patchsource}/sched/0001-bore-cachy.patch");;
+ hardened) ## Hardened Patches with BORE Scheduler
+ source+=("${_patchsource}/sched/0001-bore-cachy.patch"
+ "${_patchsource}/misc/0001-hardened.patch");;
+esac
+
## Kernel CFI Patch
if [ -n "$_use_kcfi" ]; then
BUILD_FLAGS=(
@@ -312,6 +291,8 @@ export KBUILD_BUILD_HOST=cachyos
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
+_die() { error "$@" ; exit; }
+
prepare() {
cd ${srcdir}/$_srcname
@@ -359,50 +340,23 @@ prepare() {
else
error "The value is empty. Choose the correct one again."
fi
- error "Selecting CachyOS config failed!"
- exit
+ _die "Selecting CachyOS config failed!"
fi
### Selecting the CPU scheduler
- if [ "$_cpusched" = "bmq" ]; then
- echo "Selecting BMQ CPU scheduler..."
- scripts/config -e SCHED_ALT \
- -e SCHED_BMQ \
- -d SCHED_PDS
- elif [ "$_cpusched" = "pds" ]; then
- echo "Selecting PDS CPU scheduler..."
- scripts/config -e SCHED_ALT \
- -d SCHED_BMQ \
- -e SCHED_PDS
- elif [ "$_cpusched" = "cacule" ]; then
- echo "Selecting CacULE scheduler..."
- scripts/config -e CACULE_SCHED \
- -d CACULE_RDB
- elif [ "$_cpusched" = "cacule-rdb" ]; then
- echo "Selecting CacULE-RDB scheduler..."
- scripts/config -e CACULE_SCHED \
- -e CACULE_RDB \
- --set-val RDB_INTERVAL 19
- elif [ "$_cpusched" = "bore" ]; then
- echo "Selecting BORE Scheduler..."
- scripts/config -e SCHED_BORE
- elif [ "$_cpusched" = "tt" ]; then
- echo "Selecting TT Scheduler..."
- scripts/config -e TT_SCHED \
- -e TT_ACCOUNTING_STATS
- elif [ "$_cpusched" = "cfs" ]; then
- echo "Selecting Completely Fair Scheduler..."
- elif [ "$_cpusched" = "hardened" ]; then
- echo "Selecting hardened patches with the BORE Scheduler..."
- 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
+ [ -z "$_cpusched" ] && _die "The value is empty. Choose the correct one again."
+
+ case "$_cpusched" in
+ pds) scripts/config -e SCHED_ALT -d SCHED_BMQ -e SCHED_PDS;;
+ bmq) scripts/config -e SCHED_ALT -e SCHED_BMQ -d SCHED_PDS;;
+ tt) scripts/config -e TT_SCHED -e TT_ACCOUNTING_STATS;;
+ bore|hardened) scripts/config -e SCHED_BORE;;
+ cfs) ;;
+ *) _die "The value $_cpusched is invalid. Choose the correct one again.";;
+ esac
+
+ local sched_name="$(echo $_cpusched|tr '[:lower:]' '[:upper:]')"
+ echo "Selecting ${sched_name} CPU scheduler..."
### Enable KCFI
if [ -n "$_use_kcfi" ]; then
@@ -448,19 +402,15 @@ prepare() {
fi
### Select tick rate
- if [[ -z $_HZ_ticks ]]; then
- error "The value is empty. Choose the correct one again."
- exit
- fi
+ [ -z $_HZ_ticks ] && _die "The value is empty. Choose the correct one again."
case "$_HZ_ticks" in
100|250|500|600|750|1000)
- scripts/config -d HZ_300 -e "HZ_${_HZ_ticks}" --set-val HZ $_HZ_ticks;;
+ scripts/config -d HZ_300 -e "HZ_${_HZ_ticks}" --set-val HZ "${_HZ_ticks}";;
300)
scripts/config -e HZ_300 --set-val HZ 300;;
*)
- error "The value $_HZ_ticks is invalid. Choose the correct one again."
- exit;;
+ _die "The value $_HZ_ticks is invalid. Choose the correct one again."
esac
echo "Setting tick rate to ${_HZ_ticks}Hz..."
@@ -541,8 +491,7 @@ prepare() {
else
error "The value is empty. Choose the correct one again."
fi
- error "Selecting the tick rate failed!"
- exit
+ _die "Selecting the tick rate failed!"
fi
### Select preempt type
@@ -579,8 +528,7 @@ prepare() {
else
error "The value is empty. Choose the correct one again."
fi
- error "Selecting PREEMPT failed!"
- exit
+ _die "Selecting PREEMPT failed!"
fi
### Enable O3
@@ -642,8 +590,7 @@ prepare() {
else
error "The value is empty. Choose the correct one again."
fi
- error "Enabling per-VMA locking failed!"
- exit
+ _die "Enabling per-VMA locking failed!"
fi
### Select THP
@@ -661,8 +608,7 @@ prepare() {
else
error "The value is empty. Choose the correct one again."
fi
- error "Setting THP has failed!"
- exit
+ _die "Setting THP has failed!"
fi
### Enable DAMON
@@ -780,8 +726,7 @@ prepare() {
else
error "The value is empty. Choose the correct one again."
fi
- error "Selecting the ZSTD modules and kernel compression level failed!"
- exit
+ _die "Selecting the ZSTD modules and kernel compression level failed!"
fi
### Disable DEBUG