From: Mike Galbraith <efault@gmx.de>
To: Valentin Schneider <valentin.schneider@arm.com>,
linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH] sched: Tweak default dynamic preempt mode selection
Date: Sat, 06 Nov 2021 05:40:30 +0100 [thread overview]
Message-ID: <ff53a94401f8d6abe0303ee381f86bfb475ad354.camel@gmx.de> (raw)
In-Reply-To: <20211105104035.3112162-1-valentin.schneider@arm.com>
On Fri, 2021-11-05 at 10:40 +0000, Valentin Schneider wrote:
> 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.
Is there any way to get to PREEMPT_RT in the first selection again as
well? I had created a behavior entry for RT (below) and inverted the
dependency to make it appear in the initial selection again, but that's
clearly not gonna fly.
Starting with a 5.15 config, to select RT you currently must first
select a model you don't want, then reject PREEMPT_DYNAMIC and you'll
be offered the full menu of models immediately. With your patch added,
that became worse. After rejecting PREEMPT_DYNAMIC, I had to go
through new 5.15+ options before finally being offered the full menu.
-Mike
--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -56,10 +56,10 @@ config PREEMPT_BEHAVIOUR
embedded system with latency requirements in the
milliseconds
range.
-config PREEMPT_RT
+config PREEMPT_RT_BEHAVIOR
bool "Fully Preemptible Kernel (Real-Time)"
- depends on EXPERT && ARCH_SUPPORTS_RT && !PREEMPT_DYNAMIC
- select PREEMPTION
+ depends on EXPERT && ARCH_SUPPORTS_RT
+ select PREEMPT_RT
help
This option turns the kernel into a real-time kernel by
replacing
various locking primitives (spinlocks, rwlocks, etc.) with
@@ -86,6 +86,10 @@ config PREEMPT
select PREEMPTION
select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
+config PREEMPT_RT
+ bool
+ select PREEMPTION
+
config PREEMPT_COUNT
bool
@@ -101,7 +105,7 @@ config PREEMPT_LAZY
config PREEMPT_DYNAMIC
bool "Preemption behaviour defined on boot"
- depends on HAVE_PREEMPT_DYNAMIC
+ depends on HAVE_PREEMPT_DYNAMIC && !PREEMPT_RT
select PREEMPT
default y
help
next prev parent reply other threads:[~2021-11-06 4:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 10:40 Valentin Schneider
2021-11-06 4:40 ` Mike Galbraith [this message]
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-08 12:00 ` Valentin Schneider
2021-11-06 5:33 ` 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=ff53a94401f8d6abe0303ee381f86bfb475ad354.camel@gmx.de \
--to=efault@gmx.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=valentin.schneider@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®