From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
Mike Galbraith <efault@gmx.de>,
x86@kernel.org
Subject: Re: [tip: sched/core] sched,x86: Allow !PREEMPT_DYNAMIC
Date: Tue, 16 Feb 2021 11:38:12 +0100 [thread overview]
Message-ID: <YCuglAA95cDfSoFD@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210210141838.GA53130@lothringen>
On Wed, Feb 10, 2021 at 03:18:38PM +0100, Frederic Weisbecker wrote:
> Also should we add something like this?
I suppose we can do that, but I'd rather have actual numbers to go with
it, I don't think the trampolines are really that terrible.
> From: Frederic Weisbecker <frederic@kernel.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@kernel.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
>
next prev parent reply other threads:[~2021-02-16 10:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 13:45 [patch] preempt: select PREEMPT_DYNAMIC under PREEMPTION instead of PREEMPT Mike Galbraith
2021-02-09 15:13 ` Peter Zijlstra
2021-02-09 16:05 ` Mike Galbraith
2021-02-09 16:13 ` Peter Zijlstra
2021-02-09 16:19 ` Peter Zijlstra
2021-02-09 16:46 ` Mike Galbraith
2021-02-10 13:53 ` [tip: sched/core] sched,x86: Allow !PREEMPT_DYNAMIC tip-bot2 for Peter Zijlstra
2021-02-10 14:18 ` Frederic Weisbecker
2021-02-16 10:38 ` Peter Zijlstra [this message]
2021-02-17 13:17 ` tip-bot2 for Peter Zijlstra
2021-02-09 16:27 ` [patch] preempt: select PREEMPT_DYNAMIC under PREEMPTION instead of PREEMPT 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=YCuglAA95cDfSoFD@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=efault@gmx.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=x86@kernel.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.