[PATCH 4/5] ARM: Disable jump-label on PREEMPT_RT.

Xie Yuanbin xieyuanbin1 at huawei.com
Wed Oct 29 19:39:59 PDT 2025


On Wed, 29 Oct 2025 16:59:17 +0100, Thomas Gleixner wrote:
> 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.

This sounds like a performance issue rather than a feature issue.
Banning users from using the jump label because of a performance problem
seems like throwing the baby out with the bathwater.
Perhaps we could add a config like CONFIG_ARM_JUMP_LABEL_RT_FORCE that
allows users to select, and inform users in the description about
potential latency.

Xie Yuanbin



More information about the linux-arm-kernel mailing list