Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-cachyos-rc: Use lazy preemption by default #373

Closed
wants to merge 2 commits into from

Conversation

1Naim
Copy link
Member

@1Naim 1Naim commented Jan 6, 2025

With promising results shared in #339, let's enable this and see how
it goes. A prerequisite of this is to disable dynamic preemption, which this PR already does. Further testing can be done with kernels from [1].

The last commit introduces dynamic preempt as an option in the PKGBUILD because it has been disabled by default, but I'm not too sure if we should really add this (hence it's the last commit). Dropped and left dynamic preemption enabled for fully preempted kernels.

[1] https://share.cachyos.org/x86_64_v3/kernel/preempt/

Closes #339

1Naim added 2 commits January 7, 2025 15:25
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/[email protected]/
[2] #339

Signed-off-by: Eric Naim <[email protected]>
With promising results shared in #339, let's enable this and see how
it goes.

Signed-off-by: Eric Naim <[email protected]>
@1Naim 1Naim force-pushed the feat/lazy-default branch from 0102918 to 07f78a6 Compare January 7, 2025 08:25
@1Naim
Copy link
Member Author

1Naim commented Jan 7, 2025

https://flightlesssomething.ambrosia.one/benchmark/950 New evidence has shown that lazy preemption is not meant for high CPU load responsiveness. I'm closing this PR as the config changes aren't necessary at all (modifying the config switches are sufficient). I'll consider picking them up again in the 6.13 stable sync.

Note: The 650FPS average of BORE-lazy is misleading. A more accurate average would be around 350.

@1Naim 1Naim closed this Jan 7, 2025
@1Naim 1Naim deleted the feat/lazy-default branch January 7, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Lazy) Consider to use LAZY Preemption as default on desktop kernels
1 participant