From 097507f878224816431ba739820ed0d2bbe36cd1 Mon Sep 17 00:00:00 2001 From: Eric Naim Date: Tue, 7 Jan 2025 00:38:52 +0700 Subject: [PATCH] linux-cachyos-rc: Disable dynamic preemption By observing a few results, it is observed that dynamic preemption can somehow blur the results between the various preemption models. One example is [1] where there seems to be a 5% difference in throughput between voluntary vs full with dynamic preemption disabled but then the difference goes to a measly 0.6% when dynamic preemption is enabled. I've also been able to reproduce this behaviour across various benchmarks, one of them shared in [2]. Due to that, let's disable dynamic preemption for all kernel configurations (or atleast the default). Note that PREEMPT_DYNAMIC is kept enabled for fully preempted kernels, as it is observed that it doesn't seem to matter for those, so having more options is the priority in this case. [1] https://lore.kernel.org/all/579b7ea34ef6e2f7c955abdfc0929fe1af36faef.camel@gmx.de/ [2] https://github.com/CachyOS/linux-cachyos/issues/339 Signed-off-by: Eric Naim --- linux-cachyos-rc/.SRCINFO | 2 +- linux-cachyos-rc/PKGBUILD | 4 ++-- linux-cachyos-rc/config | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-cachyos-rc/.SRCINFO b/linux-cachyos-rc/.SRCINFO index 0bb2c939..ee97cca8 100644 --- a/linux-cachyos-rc/.SRCINFO +++ b/linux-cachyos-rc/.SRCINFO @@ -28,7 +28,7 @@ pkgbase = linux-cachyos-rc source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.13/misc/dkms-clang.patch source = https://raw.githubusercontent.com/cachyos/kernel-patches/master/6.13/sched/0001-bore-cachy.patch b2sums = e82921a5852d76802004fa3764f60a916b5a2382d81ec593b63421bdfd09a2222c8afe91905abcbb1d9a4bbb270808cb247ca7f63f1db70abba39c7507133834 - b2sums = 9f099de709e971acfb9463ac96810a0ddfbd669dd8af891c7301e9ae463130a0ece65ce0c6ec35af62fcb4ed921e15870ec9db29f74b7f9d9017ff268b43d2d5 + b2sums = a25adc740f32d32708fc4d608656d62ce8cbfd4503c58c602927eb63d4ccdda09d49def4be718c220209c30cefebf33c3759e13c5fa4ccc862b15e416877c3e7 b2sums = 390c7b80608e9017f752b18660cc18ad1ec69f0aab41a2edfcfc26621dcccf5c7051c9d233d9bdf1df63d5f1589549ee0ba3a30e43148509d27dafa9102c19ab b2sums = 4bb8bbbaea6669663e2b4d4879dba05d352fd3fb5b8d9b9889d0c3ffcb8c46a6d5f63a167c64470ea6ea17e1046c7d297c7139edc8da0df2ae7636d20e311619 b2sums = c7294a689f70b2a44b0c4e9f00c61dbd59dd7063ecbe18655c4e7f12e21ed7c5bb4f5169f5aa8623b1c59de7b2667facb024913ecb9f4c650dabce4e8a7e5452 diff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILD index b0472aa6..76af01be 100644 --- a/linux-cachyos-rc/PKGBUILD +++ b/linux-cachyos-rc/PKGBUILD @@ -423,7 +423,7 @@ prepare() { case "$_preempt" in full) scripts/config -e PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_VOLUNTARY -d PREEMPT_LAZY -d PREEMPT_NONE;; - lazy) scripts/config -e PREEMPT_DYNAMIC -d PREEMPT -d PREEMPT_VOLUNTARY -e PREEMPT_LAZY -d PREEMPT_NONE;; + lazy) scripts/config -d PREEMPT_DYNAMIC -d PREEMPT -d PREEMPT_VOLUNTARY -e PREEMPT_LAZY -d PREEMPT_NONE;; voluntary) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT_VOLUNTARY_BUILD -d PREEMPT -e PREEMPT_VOLUNTARY -d PREEMPT_LAZY -d PREEMPT_NONE;; none) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT_NONE_BUILD -d PREEMPT -d PREEMPT_VOLUNTARY -d PREEMPT_LAZY -e PREEMPT_NONE;; *) _die "The value '$_preempt' is invalid. Choose the correct one again.";; @@ -832,7 +832,7 @@ for _p in "${pkgname[@]}"; do done b2sums=('e82921a5852d76802004fa3764f60a916b5a2382d81ec593b63421bdfd09a2222c8afe91905abcbb1d9a4bbb270808cb247ca7f63f1db70abba39c7507133834' - '9f099de709e971acfb9463ac96810a0ddfbd669dd8af891c7301e9ae463130a0ece65ce0c6ec35af62fcb4ed921e15870ec9db29f74b7f9d9017ff268b43d2d5' + 'a25adc740f32d32708fc4d608656d62ce8cbfd4503c58c602927eb63d4ccdda09d49def4be718c220209c30cefebf33c3759e13c5fa4ccc862b15e416877c3e7' '390c7b80608e9017f752b18660cc18ad1ec69f0aab41a2edfcfc26621dcccf5c7051c9d233d9bdf1df63d5f1589549ee0ba3a30e43148509d27dafa9102c19ab' '4bb8bbbaea6669663e2b4d4879dba05d352fd3fb5b8d9b9889d0c3ffcb8c46a6d5f63a167c64470ea6ea17e1046c7d297c7139edc8da0df2ae7636d20e311619' 'c7294a689f70b2a44b0c4e9f00c61dbd59dd7063ecbe18655c4e7f12e21ed7c5bb4f5169f5aa8623b1c59de7b2667facb024913ecb9f4c650dabce4e8a7e5452' diff --git a/linux-cachyos-rc/config b/linux-cachyos-rc/config index 40bb96b4..15dd60dd 100644 --- a/linux-cachyos-rc/config +++ b/linux-cachyos-rc/config @@ -140,7 +140,7 @@ CONFIG_PREEMPT=y # CONFIG_PREEMPT_RT is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y -CONFIG_PREEMPT_DYNAMIC=y +# CONFIG_PREEMPT_DYNAMIC is not set CONFIG_SCHED_CORE=y CONFIG_SCHED_CLASS_EXT=y