Re: [RFC PATCH] kernel: allow to configure PREEMPT_NONE, PREEMPT_VOLUNTARY on kernel command line

Michal Hocko
2020-10-09T10:10:48Z

On Fri 09-10-20 11:42:45, Peter Zijlstra wrote:
> On Fri, Oct 09, 2020 at 11:12:18AM +0200, Michal Hocko wrote:
> > Is there any additional feedback? Should I split up the patch and repost
> > for inclusion?
>
> Maybe remove PREEMPT_NONE after that? Since that's then equivalent to
> building with VOLUNTARY and booting with preempt=none.

So do you mean that I should post an additional patch which does this on
top? With a justification that there is one option less to chose from?

diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
index bf82259cff96..103a5f9e4bcf 100644
--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -2,20 +2,7 @@

choice
prompt "Preemption Model"
- default PREEMPT_NONE
-
-config PREEMPT_NONE
- bool "No Forced Preemption (Server)"
- help
- This is the traditional Linux preemption model, geared towards
- throughput. It will still provide good latencies most of the
- time, but there are no guarantees and occasional longer delays
- are possible.
-
- Select this option if you are building a kernel for a server or
- scientific/computation system, or if you want to maximize the
- raw processing power of the kernel, irrespective of scheduling
- latencies.
+ default PREEMPT_VOLUNTARY

config PREEMPT_VOLUNTARY
bool "Voluntary Kernel Preemption (Desktop)"

--
Michal Hocko
SUSE Labs