public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
	rostedt@goodmis.org, "Paul E. McKenney" <paulmck@kernel.org>,
	Dan Carpenter <dan.carpenter@linaro.org>
Subject: [PATCH rcu 5/9] srcu: Disable interrupts directly in srcu_gp_end()
Date: Tue,  4 Jun 2024 15:23:51 -0700	[thread overview]
Message-ID: <20240604222355.2370768-5-paulmck@kernel.org> (raw)
In-Reply-To: <657595c8-e86c-4594-a5b1-3c64a8275607@paulmck-laptop>

Interrupts are enabled in srcu_gp_end(), so this commit switches from
spin_lock_irqsave_rcu_node() and spin_unlock_irqrestore_rcu_node()
to spin_lock_irq_rcu_node() and spin_unlock_irq_rcu_node().

Link: https://lore.kernel.org/all/febb13ab-a4bb-48b4-8e97-7e9f7749e6da@moroto.mountain/

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/rcu/srcutree.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
index bc4b58b0204e9..d14d350f505f4 100644
--- a/kernel/rcu/srcutree.c
+++ b/kernel/rcu/srcutree.c
@@ -845,7 +845,6 @@ static void srcu_gp_end(struct srcu_struct *ssp)
 	bool cbs;
 	bool last_lvl;
 	int cpu;
-	unsigned long flags;
 	unsigned long gpseq;
 	int idx;
 	unsigned long mask;
@@ -907,12 +906,12 @@ static void srcu_gp_end(struct srcu_struct *ssp)
 	if (!(gpseq & counter_wrap_check))
 		for_each_possible_cpu(cpu) {
 			sdp = per_cpu_ptr(ssp->sda, cpu);
-			spin_lock_irqsave_rcu_node(sdp, flags);
+			spin_lock_irq_rcu_node(sdp);
 			if (ULONG_CMP_GE(gpseq, sdp->srcu_gp_seq_needed + 100))
 				sdp->srcu_gp_seq_needed = gpseq;
 			if (ULONG_CMP_GE(gpseq, sdp->srcu_gp_seq_needed_exp + 100))
 				sdp->srcu_gp_seq_needed_exp = gpseq;
-			spin_unlock_irqrestore_rcu_node(sdp, flags);
+			spin_unlock_irq_rcu_node(sdp);
 		}
 
 	/* Callback initiation done, allow grace periods after next. */
-- 
2.40.1


  parent reply	other threads:[~2024-06-04 22:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04 22:23 [PATCH rcu 0/9] Miscellaneous fixes for v6.11 Paul E. McKenney
2024-06-04 22:23 ` [PATCH rcu 1/9] rcu: Add lockdep_assert_in_rcu_read_lock() and friends Paul E. McKenney
2025-02-20 19:38   ` Jeff Johnson
2025-02-20 22:04     ` Paul E. McKenney
2025-02-20 23:51       ` Jeff Johnson
2024-06-04 22:23 ` [PATCH rcu 2/9] rcu: Reduce synchronize_rcu() delays when all wait heads are in use Paul E. McKenney
2024-06-05 12:09   ` Frederic Weisbecker
2024-06-05 18:38     ` Paul E. McKenney
2024-06-06  3:46       ` Neeraj Upadhyay
2024-06-06 16:49         ` Paul E. McKenney
2024-06-11 10:12           ` Uladzislau Rezki
2024-06-04 22:23 ` [PATCH rcu 3/9] rcu/tree: Reduce wake up for synchronize_rcu() common case Paul E. McKenney
2024-06-05 16:35   ` Frederic Weisbecker
2024-06-05 18:42     ` Paul E. McKenney
2024-06-06  5:58     ` Neeraj upadhyay
2024-06-06 18:12       ` Paul E. McKenney
2024-06-07  1:51         ` Neeraj upadhyay
2024-06-10 15:12           ` Paul E. McKenney
2024-06-11 13:46             ` Neeraj upadhyay
2024-06-11 16:17               ` Paul E. McKenney
2024-06-04 22:23 ` [PATCH rcu 4/9] rcu: Disable interrupts directly in rcu_gp_init() Paul E. McKenney
2024-06-04 22:23 ` Paul E. McKenney [this message]
2024-06-04 22:23 ` [PATCH rcu 6/9] rcu: Add rcutree.nocb_patience_delay to reduce nohz_full OS jitter Paul E. McKenney
2024-06-10  5:05   ` Leonardo Bras
2024-06-10 15:10     ` Paul E. McKenney
2024-07-03 16:21   ` Frederic Weisbecker
2024-07-03 17:25     ` Paul E. McKenney
2024-07-04 22:18       ` Frederic Weisbecker
2024-07-05  0:26         ` Paul E. McKenney
2024-06-04 22:23 ` [PATCH rcu 7/9] MAINTAINERS: Add Uladzislau Rezki as RCU maintainer Paul E. McKenney
2024-06-04 22:23 ` [PATCH rcu 8/9] rcu: Eliminate lockless accesses to rcu_sync->gp_count Paul E. McKenney
2024-06-04 22:23 ` [PATCH rcu 9/9] rcu: Fix rcu_barrier() VS post CPUHP_TEARDOWN_CPU invocation Paul E. McKenney

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=20240604222355.2370768-5-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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