diff mbox series

[v2,2/3] timers: Use __raise_softirq_irqoff() to raise the softirq.

Message ID 20241024150413.518862-3-bigeasy@linutronix.de (mailing list archive)
State New
Headers show
Series softirq: Use a dedicated thread for timer wakeups on PREEMPT_RT. | expand

Commit Message

Sebastian Sewior Oct. 24, 2024, 2:55 p.m. UTC
As an optimisation use __raise_softirq_irqoff() to raise the softirq.
This is always called from an interrupt handler, interrupts are already
disabled so it can be reduced to just or set softirq flag and let
softirq be invoked on return from interrupt.

Use __raise_softirq_irqoff() to raise the softirq.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/time/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Frederic Weisbecker Oct. 28, 2024, 1:13 p.m. UTC | #1
Le Thu, Oct 24, 2024 at 04:55:50PM +0200, Sebastian Andrzej Siewior a écrit :
> As an optimisation use __raise_softirq_irqoff() to raise the softirq.
> This is always called from an interrupt handler, interrupts are already
> disabled so it can be reduced to just or set softirq flag and let
> softirq be invoked on return from interrupt.
> 
> Use __raise_softirq_irqoff() to raise the softirq.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
diff mbox series

Patch

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 0fc9d066a7be4..1759de934284c 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -2499,7 +2499,7 @@  static void run_local_timers(void)
 		 */
 		if (time_after_eq(jiffies, READ_ONCE(base->next_expiry)) ||
 		    (i == BASE_DEF && tmigr_requires_handle_remote())) {
-			raise_softirq(TIMER_SOFTIRQ);
+			__raise_softirq_irqoff(TIMER_SOFTIRQ);
 			return;
 		}
 	}