Skip to content

Commit 31b07fe

Browse files
committed
PKGBUILD: Introduce rt $_preempt option
In an attempt to correctly classify $_cpusched as strictly CPU schedulers, remove both `rt` and `rt-bore` from $_cpusched option and move it to $_preempt. In fact, this would be more correct and make more sense, since PREEMPT_RT only makes more code preemptible compared to PREEMPT and doesn't do anything else special. One of the blockers for this was sourcing the OOT patches that were needed for the i915 module to be compiled, but this is not a problem as there is a conditional check for rt to not build zfs. Signed-off-by: Eric Naim <dnaim@cachyos.org>
1 parent a0ba187 commit 31b07fe

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

linux-cachyos-rc/PKGBUILD

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ _cachy_config=${_cachy_config-y}
1818
# 'hardened' - select 'BORE Scheduler hardened' ## kernel with hardened config and hardening patches with the bore scheduler
1919
# 'cachyos' - select 'CachyOS Default Scheduler (BORE)'
2020
# 'eevdf' - select 'EEVDF Scheduler'
21-
# 'rt' - select EEVDF, but includes a series of realtime patches
22-
# 'rt-bore' - select Burst-Oriented Response Enhancer, but includes a series of realtime patches
2321
_cpusched=${_cpusched-cachyos}
2422

2523
### Tweak kernel options prior to a build via nconfig
@@ -76,7 +74,7 @@ _HZ_ticks=${_HZ_ticks-1000}
7674
### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency.
7775
_tickrate=${_tickrate-full}
7876

79-
## Choose between full(low-latency), lazy, voluntary or none
77+
## Choose between rt(realtime), full(low-latency), lazy, voluntary or none
8078
_preempt=${_preempt-full}
8179

8280
### Transparent Hugepages
@@ -224,8 +222,10 @@ if _is_lto_kernel; then
224222
fi
225223

226224
# WARNING The ZFS module doesn't build with selected RT sched due to licensing issues.
227-
if [[ "$_cpusched" = "rt" || "$_cpusched" = "rt-bore" ]]; then
225+
if [ "$_preempt" = "rt" ]; then
228226
unset _build_zfs
227+
# Uncomment this when the patch exists
228+
#source+=("${_patchsource}/misc/0001-rt.patch")
229229
fi
230230

231231
# ZFS support
@@ -263,7 +263,7 @@ fi
263263

264264
## List of CachyOS schedulers
265265
case "$_cpusched" in
266-
cachyos|bore|rt-bore|hardened) # CachyOS Scheduler (BORE)
266+
cachyos|bore|hardened) # CachyOS Scheduler (BORE)
267267
source+=("${_patchsource}/sched/0001-bore-cachy.patch");;&
268268
bmq) ## Project C Scheduler
269269
source+=("${_patchsource}/sched/0001-prjc-cachy.patch");;
@@ -332,8 +332,6 @@ prepare() {
332332
cachyos|bore|hardened) scripts/config -e SCHED_BORE;;
333333
bmq) scripts/config -e SCHED_ALT -e SCHED_BMQ;;
334334
eevdf) ;;
335-
rt) scripts/config -d PREEMPT -e PREEMPT_RT;;
336-
rt-bore) scripts/config -e SCHED_BORE -d PREEMPT -e PREEMPT_RT;;
337335
*) _die "The value $_cpusched is invalid. Choose the correct one again.";;
338336
esac
339337

@@ -411,12 +409,8 @@ prepare() {
411409
echo "Selecting '$_tickrate' tick type..."
412410

413411
### Select preempt type
414-
415-
# We should not set up the PREEMPT for RT kernels
416-
if [[ "$_cpusched" != "rt" || "$_cpusched" != "rt-bore" ]]; then
417-
[ -z "$_preempt" ] && _die "The value is empty. Choose the correct one again."
418-
419412
case "$_preempt" in
413+
rt) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -e PREEMPT_RT;;
420414
full) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_VOLUNTARY -d PREEMPT_LAZY -d PREEMPT_NONE;;
421415
lazy) scripts/config -e PREEMPT_DYNAMIC -d PREEMPT -d PREEMPT_VOLUNTARY -e PREEMPT_LAZY -d PREEMPT_NONE;;
422416
voluntary) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT_VOLUNTARY_BUILD -d PREEMPT -e PREEMPT_VOLUNTARY -d PREEMPT_LAZY -d PREEMPT_NONE;;

0 commit comments

Comments
 (0)