* [PATCH 0/2] arm: Disable two features which are not compatible with PREEMPT_RT
@ 2022-06-13 18:24 Sebastian Andrzej Siewior
2022-06-13 18:24 ` [PATCH 1/2] arm: Disable jump-label on PREEMPT_RT Sebastian Andrzej Siewior
2022-06-13 18:24 ` [PATCH 2/2] arm: Disable softirq stacks " Sebastian Andrzej Siewior
0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-06-13 18:24 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Russell King, Arnd Bergmann, Thomas Gleixner
Hi,
this mini series disables two features on PREEMPT_RT which are not
compatible with PREEMPT_RT. The softirq stacks are also disabled on x86.
The jump-labels could be enabled if stop_machine() is avoided.
Sebastian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] arm: Disable jump-label on PREEMPT_RT.
2022-06-13 18:24 [PATCH 0/2] arm: Disable two features which are not compatible with PREEMPT_RT Sebastian Andrzej Siewior
@ 2022-06-13 18:24 ` Sebastian Andrzej Siewior
2022-06-13 18:24 ` [PATCH 2/2] arm: Disable softirq stacks " Sebastian Andrzej Siewior
1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-06-13 18:24 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Russell King, Arnd Bergmann, Thomas Gleixner,
Sebastian Andrzej Siewior
From: Thomas Gleixner <tglx@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@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7630ba9cb6ccc..2088d9322588e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -71,7 +71,7 @@ config ARM
select HARDIRQS_SW_RESEND
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
select HAVE_ARCH_KFENCE if MMU && !XIP_KERNEL
select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU
select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL
--
2.36.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] arm: Disable softirq stacks on PREEMPT_RT.
2022-06-13 18:24 [PATCH 0/2] arm: Disable two features which are not compatible with PREEMPT_RT Sebastian Andrzej Siewior
2022-06-13 18:24 ` [PATCH 1/2] arm: Disable jump-label on PREEMPT_RT Sebastian Andrzej Siewior
@ 2022-06-13 18:24 ` Sebastian Andrzej Siewior
1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-06-13 18:24 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Russell King, Arnd Bergmann, Thomas Gleixner,
Sebastian Andrzej Siewior
PREEMPT_RT preempts softirqs and the current implementation avoids
do_softirq_own_stack() and only uses __do_softirq().
Disable the unused softirqs stacks on PREEMPT_RT to safe some memory and
ensure that do_softirq_own_stack() is not used which is not expected.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/arm/kernel/irq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 5c6f8d11a3ce5..034cb48c9eeb8 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -70,6 +70,7 @@ static void __init init_irq_stacks(void)
}
}
+#ifndef CONFIG_PREEMPT_RT
static void ____do_softirq(void *arg)
{
__do_softirq();
@@ -80,7 +81,7 @@ void do_softirq_own_stack(void)
call_with_stack(____do_softirq, NULL,
__this_cpu_read(irq_stack_ptr));
}
-
+#endif
#endif
int arch_show_interrupts(struct seq_file *p, int prec)
--
2.36.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-13 18:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-13 18:24 [PATCH 0/2] arm: Disable two features which are not compatible with PREEMPT_RT Sebastian Andrzej Siewior
2022-06-13 18:24 ` [PATCH 1/2] arm: Disable jump-label on PREEMPT_RT Sebastian Andrzej Siewior
2022-06-13 18:24 ` [PATCH 2/2] arm: Disable softirq stacks " Sebastian Andrzej Siewior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).