[PATCH 4/5] ARM: Disable jump-label on PREEMPT_RT.
Sebastian Andrzej Siewior
bigeasy at linutronix.de
Thu Oct 30 08:28:00 PDT 2025
On 2025-10-30 16:24:16 [+0100], Arnd Bergmann wrote:
> On Wed, Oct 29, 2025, at 16:59, Sebastian Andrzej Siewior wrote:
> > From: Thomas Gleixner <tglx at linutronix.de>
> >
> > jump-labels are used to efficiently switch between two possible code
> > paths. To achieve this, stop_machine() is used to keep the CPU in a
> > known state while the opcode is modified. The usage of stop_machine()
> > here leads to large latency spikes which can be observed on PREEMPT_RT.
> >
> > Jump labels may change the target during runtime and are not restricted
> > to debug or "configuration/ setup" part of a PREEMPT_RT system where
> > high latencies could be defined as acceptable.
> >
> > Disable jump-label support on a PREEMPT_RT system.
> >
> > [bigeasy: Patch description.]
> >
> > Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> > ---
> > arch/arm/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index 864a14a434b08..99c9b1c320af8 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -80,7 +80,7 @@ config ARM
> > select HAS_IOPORT
> > select HAVE_ARCH_AUDITSYSCALL if AEABI && !OABI_COMPAT
> > select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
> > - select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU
> > + select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU
> > && !PREEMPT_RT
>
> I posted a slightly different version last year, which optimizes
> the uniprocessor version and has a little more information
> in the changelog:
>
> https://lore.kernel.org/all/20241210160556.2341497-2-arnd@kernel.org/
This actually slipped my mind but I was fine with it according the link.
So let me replace this, too.
> Arnd
Sebastian
More information about the linux-arm-kernel
mailing list