Skip to content

Commit

Permalink
linux-cachyos-rc: Disable dynamic preemption
Browse files Browse the repository at this point in the history
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)

[1] https://lore.kernel.org/all/[email protected]/
[2] #339

Signed-off-by: Eric Naim <[email protected]>
  • Loading branch information
1Naim committed Jan 6, 2025
1 parent 9665091 commit ed8597f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion linux-cachyos-rc/.SRCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 62156108dc2cf8b2421ca4a90d1281267ba6867b7f8ed11e346a44a88bb699667af405fb4d12e4f72a8815dfb8fbf9c32120270d0455e21ca262cffe982829e9
b2sums = b253a968c5a0e28154861b5abe420456d3b5d7d311beb1e7a2a213396600c6be64b8f420d613685d857dfaf52fd9c87bf241320c9f60bf87c7fd59a71acc156e
b2sums = 390c7b80608e9017f752b18660cc18ad1ec69f0aab41a2edfcfc26621dcccf5c7051c9d233d9bdf1df63d5f1589549ee0ba3a30e43148509d27dafa9102c19ab
b2sums = 1e4cf21d220271d0d63ea23ae13f3172a286eeb858c00d12900bde1691dcf7a0825560f991d97d40f23107aabdada02127b7deb6fead0c1ade0d73ba684e883a
b2sums = c7294a689f70b2a44b0c4e9f00c61dbd59dd7063ecbe18655c4e7f12e21ed7c5bb4f5169f5aa8623b1c59de7b2667facb024913ecb9f4c650dabce4e8a7e5452
Expand Down
6 changes: 3 additions & 3 deletions linux-cachyos-rc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ prepare() {
[ -z "$_preempt" ] && _die "The value is empty. Choose the correct one again."

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;;
full) scripts/config -d PREEMPT_DYNAMIC -e PREEMPT -d PREEMPT_VOLUNTARY -d 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.";;
Expand Down Expand Up @@ -832,7 +832,7 @@ for _p in "${pkgname[@]}"; do
done

b2sums=('e82921a5852d76802004fa3764f60a916b5a2382d81ec593b63421bdfd09a2222c8afe91905abcbb1d9a4bbb270808cb247ca7f63f1db70abba39c7507133834'
'62156108dc2cf8b2421ca4a90d1281267ba6867b7f8ed11e346a44a88bb699667af405fb4d12e4f72a8815dfb8fbf9c32120270d0455e21ca262cffe982829e9'
'b253a968c5a0e28154861b5abe420456d3b5d7d311beb1e7a2a213396600c6be64b8f420d613685d857dfaf52fd9c87bf241320c9f60bf87c7fd59a71acc156e'
'390c7b80608e9017f752b18660cc18ad1ec69f0aab41a2edfcfc26621dcccf5c7051c9d233d9bdf1df63d5f1589549ee0ba3a30e43148509d27dafa9102c19ab'
'1e4cf21d220271d0d63ea23ae13f3172a286eeb858c00d12900bde1691dcf7a0825560f991d97d40f23107aabdada02127b7deb6fead0c1ade0d73ba684e883a'
'c7294a689f70b2a44b0c4e9f00c61dbd59dd7063ecbe18655c4e7f12e21ed7c5bb4f5169f5aa8623b1c59de7b2667facb024913ecb9f4c650dabce4e8a7e5452'
Expand Down
2 changes: 1 addition & 1 deletion linux-cachyos-rc/config
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ed8597f

Please sign in to comment.