public inbox for rcu@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-kernel@vger.kernel.org, rcu@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
	Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Frederic Weisbecker <frederic@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH v3 2/3] timers: Use __raise_softirq_irqoff() to raise the softirq.
Date: Wed,  6 Nov 2024 15:51:38 +0100	[thread overview]
Message-ID: <20241106150419.2593080-3-bigeasy@linutronix.de> (raw)
In-Reply-To: <20241106150419.2593080-1-bigeasy@linutronix.de>

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.

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

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;
 		}
 	}
-- 
2.45.2


  parent reply	other threads:[~2024-11-06 15:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 14:51 PATCH v3 0/3] softirq: Use a dedicated thread for timer wakeups with forced-threading Sebastian Andrzej Siewior
2024-11-06 14:51 ` [PATCH v3 1/3] hrtimer: Use __raise_softirq_irqoff() to raise the softirq Sebastian Andrzej Siewior
2024-11-06 14:51 ` Sebastian Andrzej Siewior [this message]
2024-11-06 14:51 ` [PATCH v3 3/3] softirq: Use a dedicated thread for timer wakeups on PREEMPT_RT Sebastian Andrzej Siewior
2025-12-01 21:51   ` Jan Kiszka
2025-12-01 23:49     ` Luis Claudio R. Goncalves
2025-12-02  6:57       ` Jan Kiszka
2025-12-02  8:22         ` Sebastian Andrzej Siewior
2025-12-02  8:24     ` Sebastian Andrzej Siewior
2025-12-02 12:39       ` Jan Kiszka
2025-12-02 13:22         ` Sebastian Andrzej Siewior

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=20241106150419.2593080-3-bigeasy@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=anna-maria@linutronix.de \
    --cc=dave@stgolabs.net \
    --cc=frederic@kernel.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox