From: Valentin Schneider <valentin.schneider@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>
Subject: [PATCH] sched: Tweak default dynamic preempt mode selection
Date: Fri, 5 Nov 2021 10:40:35 +0000 [thread overview]
Message-ID: <20211105104035.3112162-1-valentin.schneider@arm.com> (raw)
Commit c597bfddc9e9 ("sched: Provide Kconfig support for default dynamic
preempt mode") changed the selectable config names for the preemption
model. This means a config file must now select
CONFIG_PREEMPT_BEHAVIOUR=y
rather than
CONFIG_PREEMPT=y
to get a preemptible kernel. This means all arch config files need to be
updated - right now arm64 defconfig selects CONFIG_PREEMPT=y but ends up
with CONFIG_PREEMPT_NONE_BEHAVIOUR=y.
Instead, have CONFIG_*PREEMPT be the selectable configs again, and make
them select their _BEHAVIOUR equivalent if CONFIG_PREEMPT_DYNAMIC is set.
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
---
kernel/Kconfig.preempt | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
index 60f1bfc3c7b2..25e8d6a3d9fa 100644
--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -1,12 +1,21 @@
# SPDX-License-Identifier: GPL-2.0-only
+config PREEMPT_NONE_BEHAVIOUR
+ bool
+
+config PREEMPT_VOLUNTARY_BEHAVIOUR
+ bool
+
+config PREEMPT_BEHAVIOUR
+ bool
+
choice
prompt "Preemption Model"
- default PREEMPT_NONE_BEHAVIOUR
+ default PREEMPT_NONE
-config PREEMPT_NONE_BEHAVIOUR
+config PREEMPT_NONE
bool "No Forced Preemption (Server)"
- select PREEMPT_NONE if !PREEMPT_DYNAMIC
+ select PREEMPT_NONE_BEHAVIOUR if PREEMPT_DYNAMIC
help
This is the traditional Linux preemption model, geared towards
throughput. It will still provide good latencies most of the
@@ -18,10 +27,10 @@ config PREEMPT_NONE_BEHAVIOUR
raw processing power of the kernel, irrespective of scheduling
latencies.
-config PREEMPT_VOLUNTARY_BEHAVIOUR
+config PREEMPT_VOLUNTARY
bool "Voluntary Kernel Preemption (Desktop)"
depends on !ARCH_NO_PREEMPT
- select PREEMPT_VOLUNTARY if !PREEMPT_DYNAMIC
+ select PREEMPT_VOLUNTARY_BEHAVIOUR if PREEMPT_DYNAMIC
help
This option reduces the latency of the kernel by adding more
"explicit preemption points" to the kernel code. These new
@@ -37,10 +46,12 @@ config PREEMPT_VOLUNTARY_BEHAVIOUR
Select this if you are building a kernel for a desktop system.
-config PREEMPT_BEHAVIOUR
+config PREEMPT
bool "Preemptible Kernel (Low-Latency Desktop)"
depends on !ARCH_NO_PREEMPT
- select PREEMPT
+ select PREEMPTION
+ select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
+ select PREEMPT_BEHAVIOUR if PREEMPT_DYNAMIC
help
This option reduces the latency of the kernel by making
all kernel code (that is not executing in a critical section)
@@ -75,17 +86,6 @@ config PREEMPT_RT
endchoice
-config PREEMPT_NONE
- bool
-
-config PREEMPT_VOLUNTARY
- bool
-
-config PREEMPT
- bool
- select PREEMPTION
- select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
-
config PREEMPT_COUNT
bool
--
2.25.1
next reply other threads:[~2021-11-05 10:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 10:40 Valentin Schneider [this message]
2021-11-06 4:40 ` [PATCH] sched: Tweak default dynamic preempt mode selection Mike Galbraith
2021-11-08 11:17 ` Valentin Schneider
2021-11-08 12:27 ` Mike Galbraith
2021-11-08 15:21 ` Valentin Schneider
2021-11-09 5:30 ` Mike Galbraith
2021-11-09 9:52 ` Valentin Schneider
2021-11-09 11:00 ` Mike Galbraith
2021-11-09 12:19 ` Valentin Schneider
2021-11-09 13:31 ` Mike Galbraith
2021-11-06 5:05 ` kernel test robot
2021-11-06 5:05 ` kernel test robot
2021-11-08 12:00 ` Valentin Schneider
2021-11-08 12:00 ` Valentin Schneider
2021-11-06 5:33 ` kernel test robot
2021-11-06 5:33 ` kernel test robot
2021-11-06 7:58 ` kernel test robot
2021-11-06 7:58 ` kernel test robot
2021-11-09 10:25 ` Frederic Weisbecker
2021-11-10 0:03 ` Valentin Schneider
2021-11-10 5:44 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211105104035.3112162-1-valentin.schneider@arm.com \
--to=valentin.schneider@arm.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.