[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210210141838.GA53130@lothringen>
Date: Wed, 10 Feb 2021 15:18:38 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: linux-tip-commits@...r.kernel.org, Mike Galbraith <efault@....de>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org
Subject: Re: [tip: sched/core] sched,x86: Allow !PREEMPT_DYNAMIC
On Wed, Feb 10, 2021 at 01:53:31PM -0000, tip-bot2 for Peter Zijlstra wrote:
> The following commit has been merged into the sched/core branch of tip:
>
> Commit-ID: 82891be90f3c42dc964fd61b8b2a89de12940c9f
> Gitweb: https://git.kernel.org/tip/82891be90f3c42dc964fd61b8b2a89de12940c9f
> Author: Peter Zijlstra <peterz@...radead.org>
> AuthorDate: Tue, 09 Feb 2021 22:02:33 +01:00
> Committer: Peter Zijlstra <peterz@...radead.org>
> CommitterDate: Wed, 10 Feb 2021 14:44:51 +01:00
>
> sched,x86: Allow !PREEMPT_DYNAMIC
>
> Allow building x86 with PREEMPT_DYNAMIC=n, this is needed for
> PREEMPT_RT as it makes no sense to not have full preemption on
> PREEMPT_RT.
>
> Fixes: 8c98e8cf723c ("preempt/dynamic: Provide preempt_schedule[_notrace]() static calls")
> Reported-by: Mike Galbraith <efault@....de>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Tested-by: Mike Galbraith <efault@....de>
> Link: https://lkml.kernel.org/r/YCK1+JyFNxQnWeXK@hirez.programming.kicks-ass.net
Also should we add something like this?
>From 4e1de6d9d8804ea7edc6f8767abea37f5103799a Mon Sep 17 00:00:00 2001
From: Frederic Weisbecker <frederic@...nel.org>
Date: Wed, 10 Feb 2021 15:11:39 +0100
Subject: [PATCH] preempt/dynamic: Make PREEMPT_DYNAMIC optional
In order not to make the small trampoline overhead mandatory for archs
that support HAVE_STATIC_CALL but not HAVE_STATIC_CALL_INLINE, make
PREEMPT_DYNAMIC optional.
Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
---
kernel/Kconfig.preempt | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
index 416017301660..1fe759677907 100644
--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -40,7 +40,6 @@ config PREEMPT
depends on !ARCH_NO_PREEMPT
select PREEMPTION
select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
- select PREEMPT_DYNAMIC if HAVE_PREEMPT_DYNAMIC
help
This option reduces the latency of the kernel by making
all kernel code (that is not executing in a critical section)
@@ -83,11 +82,13 @@ config PREEMPTION
select PREEMPT_COUNT
config PREEMPT_DYNAMIC
- bool
+ bool "Override preemption flavour at boot time"
+ depends on HAVE_PREEMPT_DYNAMIC && PREEMPT
+ default HAVE_STATIC_CALL_INLINE
help
This option allows to define the preemption model on the kernel
- command line parameter and thus override the default preemption
- model defined during compile time.
+ command line parameter "preempt=" and thus override the default
+ preemption model defined during compile time.
The feature is primarily interesting for Linux distributions which
provide a pre-built kernel binary to reduce the number of kernel
@@ -99,3 +100,5 @@ config PREEMPT_DYNAMIC
Interesting if you want the same pre-built kernel should be used for
both Server and Desktop workloads.
+
+ Say Y if you have CONFIG_HAVE_STATIC_CALL_INLINE.
--
2.25.1
Powered by blists - more mailing lists