From 105008bac14ab9a96bb33d61edefbcad77e4eb52 Mon Sep 17 00:00:00 2001 From: Eric Naim Date: Mon, 4 May 2026 09:41:25 +0800 Subject: [PATCH] stable: Bring back PREEMPT_DYNAMIC It was a bad decision to disable it in the first place, and thinking about it again it really doesn't make sense to have it disabled. Let's enable it again so users can freely switch between preemption methods at runtime. Signed-off-by: Eric Naim --- linux-cachyos-bmq/PKGBUILD | 8 +++----- linux-cachyos-bmq/config | 2 +- linux-cachyos-bore/PKGBUILD | 8 +++----- linux-cachyos-bore/config | 2 +- linux-cachyos-deckify/PKGBUILD | 8 +++----- linux-cachyos-deckify/config | 2 +- linux-cachyos-eevdf/PKGBUILD | 8 +++----- linux-cachyos-eevdf/config | 2 +- linux-cachyos-rt-bore/PKGBUILD | 10 ++++------ linux-cachyos-rt-bore/config | 2 +- linux-cachyos-server/PKGBUILD | 8 +++----- linux-cachyos-server/config | 2 +- linux-cachyos/PKGBUILD | 8 +++----- linux-cachyos/config | 2 +- 14 files changed, 29 insertions(+), 43 deletions(-) diff --git a/linux-cachyos-bmq/PKGBUILD b/linux-cachyos-bmq/PKGBUILD index 3ccbab4ce..d9ec1ffb8 100644 --- a/linux-cachyos-bmq/PKGBUILD +++ b/linux-cachyos-bmq/PKGBUILD @@ -64,8 +64,7 @@ ### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. : "${_tickrate:=full}" -## Choose between full, lazy or dynamic -# Dynamic allows you to switch between full and lazy at runtime +## Choose between full or lazy # Full: Makes all non-critical kernel code preemptible to reduce latency # Lazy: Same as full but instead of preempting immediately it waits for signals from the scheduler # in an attempt to boost throughput. @@ -363,9 +362,8 @@ prepare() { # We should not set up the PREEMPT for RT kernels if [[ "$_cpusched" != "rt" && "$_cpusched" != "rt-bore" ]]; then case "$_preempt" in - full) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; - lazy) scripts/config -d PREEMPT_DYNAMIC -d PREEMPT -e PREEMPT_LAZY;; - dynamic) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; + full) scripts/config -e PREEMPT -d PREEMPT_LAZY;; + lazy) scripts/config -d PREEMPT -e PREEMPT_LAZY;; *) _die "The value '$_preempt' is invalid. Choose the correct one again.";; esac diff --git a/linux-cachyos-bmq/config b/linux-cachyos-bmq/config index 5e6602ca4..649a0fac9 100644 --- a/linux-cachyos-bmq/config +++ b/linux-cachyos-bmq/config @@ -148,7 +148,7 @@ CONFIG_PREEMPT=y # CONFIG_PREEMPT_RT is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y -# CONFIG_PREEMPT_DYNAMIC is not set +CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y CONFIG_SCHED_CLASS_EXT=y diff --git a/linux-cachyos-bore/PKGBUILD b/linux-cachyos-bore/PKGBUILD index 49bf1737c..c7af1a0a0 100644 --- a/linux-cachyos-bore/PKGBUILD +++ b/linux-cachyos-bore/PKGBUILD @@ -64,8 +64,7 @@ ### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. : "${_tickrate:=full}" -## Choose between full, lazy or dynamic -# Dynamic allows you to switch between full and lazy at runtime +## Choose between full or lazy # Full: Makes all non-critical kernel code preemptible to reduce latency # Lazy: Same as full but instead of preempting immediately it waits for signals from the scheduler # in an attempt to boost throughput. @@ -363,9 +362,8 @@ prepare() { # We should not set up the PREEMPT for RT kernels if [[ "$_cpusched" != "rt" && "$_cpusched" != "rt-bore" ]]; then case "$_preempt" in - full) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; - lazy) scripts/config -d PREEMPT_DYNAMIC -d PREEMPT -e PREEMPT_LAZY;; - dynamic) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; + full) scripts/config -e PREEMPT -d PREEMPT_LAZY;; + lazy) scripts/config -d PREEMPT -e PREEMPT_LAZY;; *) _die "The value '$_preempt' is invalid. Choose the correct one again.";; esac diff --git a/linux-cachyos-bore/config b/linux-cachyos-bore/config index 5e6602ca4..649a0fac9 100644 --- a/linux-cachyos-bore/config +++ b/linux-cachyos-bore/config @@ -148,7 +148,7 @@ CONFIG_PREEMPT=y # CONFIG_PREEMPT_RT is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y -# CONFIG_PREEMPT_DYNAMIC is not set +CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y CONFIG_SCHED_CLASS_EXT=y diff --git a/linux-cachyos-deckify/PKGBUILD b/linux-cachyos-deckify/PKGBUILD index 7a2293251..00357a88d 100644 --- a/linux-cachyos-deckify/PKGBUILD +++ b/linux-cachyos-deckify/PKGBUILD @@ -64,8 +64,7 @@ ### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. : "${_tickrate:=full}" -## Choose between full, lazy or dynamic -# Dynamic allows you to switch between full and lazy at runtime +## Choose between full or lazy # Full: Makes all non-critical kernel code preemptible to reduce latency # Lazy: Same as full but instead of preempting immediately it waits for signals from the scheduler # in an attempt to boost throughput. @@ -364,9 +363,8 @@ prepare() { # We should not set up the PREEMPT for RT kernels if [[ "$_cpusched" != "rt" && "$_cpusched" != "rt-bore" ]]; then case "$_preempt" in - full) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; - lazy) scripts/config -d PREEMPT_DYNAMIC -d PREEMPT -e PREEMPT_LAZY;; - dynamic) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; + full) scripts/config -e PREEMPT -d PREEMPT_LAZY;; + lazy) scripts/config -d PREEMPT -e PREEMPT_LAZY;; *) _die "The value '$_preempt' is invalid. Choose the correct one again.";; esac diff --git a/linux-cachyos-deckify/config b/linux-cachyos-deckify/config index cf30ec7b7..8ea65677b 100644 --- a/linux-cachyos-deckify/config +++ b/linux-cachyos-deckify/config @@ -148,7 +148,7 @@ CONFIG_PREEMPT=y # CONFIG_PREEMPT_RT is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y -# CONFIG_PREEMPT_DYNAMIC is not set +CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y CONFIG_SCHED_CLASS_EXT=y diff --git a/linux-cachyos-eevdf/PKGBUILD b/linux-cachyos-eevdf/PKGBUILD index 96d48f118..1c398acee 100644 --- a/linux-cachyos-eevdf/PKGBUILD +++ b/linux-cachyos-eevdf/PKGBUILD @@ -64,8 +64,7 @@ ### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. : "${_tickrate:=full}" -## Choose between full, lazy or dynamic -# Dynamic allows you to switch between full and lazy at runtime +## Choose between full or lazy # Full: Makes all non-critical kernel code preemptible to reduce latency # Lazy: Same as full but instead of preempting immediately it waits for signals from the scheduler # in an attempt to boost throughput. @@ -366,9 +365,8 @@ prepare() { # We should not set up the PREEMPT for RT kernels if [[ "$_cpusched" != "rt" && "$_cpusched" != "rt-bore" ]]; then case "$_preempt" in - full) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; - lazy) scripts/config -d PREEMPT_DYNAMIC -d PREEMPT -e PREEMPT_LAZY;; - dynamic) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; + full) scripts/config -e PREEMPT -d PREEMPT_LAZY;; + lazy) scripts/config -d PREEMPT -e PREEMPT_LAZY;; *) _die "The value '$_preempt' is invalid. Choose the correct one again.";; esac diff --git a/linux-cachyos-eevdf/config b/linux-cachyos-eevdf/config index 5e6602ca4..649a0fac9 100644 --- a/linux-cachyos-eevdf/config +++ b/linux-cachyos-eevdf/config @@ -148,7 +148,7 @@ CONFIG_PREEMPT=y # CONFIG_PREEMPT_RT is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y -# CONFIG_PREEMPT_DYNAMIC is not set +CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y CONFIG_SCHED_CLASS_EXT=y diff --git a/linux-cachyos-rt-bore/PKGBUILD b/linux-cachyos-rt-bore/PKGBUILD index ef2a267c5..851244308 100644 --- a/linux-cachyos-rt-bore/PKGBUILD +++ b/linux-cachyos-rt-bore/PKGBUILD @@ -64,14 +64,13 @@ ### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. : "${_tickrate:=full}" -## Choose between full, lazy or dynamic -# Dynamic allows you to switch between full and lazy at runtime +## Choose between full or lazy # Full: Makes all non-critical kernel code preemptible to reduce latency # Lazy: Same as full but instead of preempting immediately it waits for signals from the scheduler # in an attempt to boost throughput. # In practice, this doesn't seem to perform well as both throughput and latency suffer # compared to full. -: "${_preempt:=dynamic}" +: "${_preempt:=full}" ### Transparent Hugepages # ATTENTION - one of two predefined values should be selected! @@ -366,9 +365,8 @@ prepare() { # We should not set up the PREEMPT for RT kernels if [[ "$_cpusched" != "rt" && "$_cpusched" != "rt-bore" ]]; then case "$_preempt" in - full) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; - lazy) scripts/config -d PREEMPT_DYNAMIC -d PREEMPT -e PREEMPT_LAZY;; - dynamic) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; + full) scripts/config -e PREEMPT -d PREEMPT_LAZY;; + lazy) scripts/config -d PREEMPT -e PREEMPT_LAZY;; *) _die "The value '$_preempt' is invalid. Choose the correct one again.";; esac diff --git a/linux-cachyos-rt-bore/config b/linux-cachyos-rt-bore/config index 5e6602ca4..649a0fac9 100644 --- a/linux-cachyos-rt-bore/config +++ b/linux-cachyos-rt-bore/config @@ -148,7 +148,7 @@ CONFIG_PREEMPT=y # CONFIG_PREEMPT_RT is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y -# CONFIG_PREEMPT_DYNAMIC is not set +CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y CONFIG_SCHED_CLASS_EXT=y diff --git a/linux-cachyos-server/PKGBUILD b/linux-cachyos-server/PKGBUILD index 59f134461..bd2e6a0e3 100644 --- a/linux-cachyos-server/PKGBUILD +++ b/linux-cachyos-server/PKGBUILD @@ -64,8 +64,7 @@ ### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. : "${_tickrate:=full}" -## Choose between full, lazy or dynamic -# Dynamic allows you to switch between full and lazy at runtime +## Choose between full or lazy # Full: Makes all non-critical kernel code preemptible to reduce latency # Lazy: Same as full but instead of preempting immediately it waits for signals from the scheduler # in an attempt to boost throughput. @@ -363,9 +362,8 @@ prepare() { # We should not set up the PREEMPT for RT kernels if [[ "$_cpusched" != "rt" && "$_cpusched" != "rt-bore" ]]; then case "$_preempt" in - full) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; - lazy) scripts/config -d PREEMPT_DYNAMIC -d PREEMPT -e PREEMPT_LAZY;; - dynamic) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; + full) scripts/config -e PREEMPT -d PREEMPT_LAZY;; + lazy) scripts/config -d PREEMPT -e PREEMPT_LAZY;; *) _die "The value '$_preempt' is invalid. Choose the correct one again.";; esac diff --git a/linux-cachyos-server/config b/linux-cachyos-server/config index 5e6602ca4..649a0fac9 100644 --- a/linux-cachyos-server/config +++ b/linux-cachyos-server/config @@ -148,7 +148,7 @@ CONFIG_PREEMPT=y # CONFIG_PREEMPT_RT is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y -# CONFIG_PREEMPT_DYNAMIC is not set +CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y CONFIG_SCHED_CLASS_EXT=y diff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILD index f41abb9b0..b91df3a19 100644 --- a/linux-cachyos/PKGBUILD +++ b/linux-cachyos/PKGBUILD @@ -64,8 +64,7 @@ ### Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. : "${_tickrate:=full}" -## Choose between full, lazy or dynamic -# Dynamic allows you to switch between full and lazy at runtime +## Choose between full or lazy # Full: Makes all non-critical kernel code preemptible to reduce latency # Lazy: Same as full but instead of preempting immediately it waits for signals from the scheduler # in an attempt to boost throughput. @@ -403,9 +402,8 @@ prepare() { # We should not set up the PREEMPT for RT kernels if [[ "$_cpusched" != "rt" && "$_cpusched" != "rt-bore" ]]; then case "$_preempt" in - full) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; - lazy) scripts/config -d PREEMPT_DYNAMIC -d PREEMPT -e PREEMPT_LAZY;; - dynamic) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_LAZY;; + full) scripts/config -e PREEMPT -d PREEMPT_LAZY;; + lazy) scripts/config -d PREEMPT -e PREEMPT_LAZY;; *) _die "The value '$_preempt' is invalid. Choose the correct one again.";; esac diff --git a/linux-cachyos/config b/linux-cachyos/config index 5e6602ca4..649a0fac9 100644 --- a/linux-cachyos/config +++ b/linux-cachyos/config @@ -148,7 +148,7 @@ CONFIG_PREEMPT=y # CONFIG_PREEMPT_RT is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y -# CONFIG_PREEMPT_DYNAMIC is not set +CONFIG_PREEMPT_DYNAMIC=y CONFIG_SCHED_CORE=y CONFIG_SCHED_CLASS_EXT=y