From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
jiangshanlai@gmail.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
Neeraj Upadhyay <neeraju@codeaurora.org>,
"Paul E . McKenney" <paulmck@linux.ibm.com>
Subject: [PATCH tip/core/rcu 2/9] rcu: Correctly unlock root node in rcu_check_gp_start_stall()
Date: Thu, 30 May 2019 08:00:08 -0700 [thread overview]
Message-ID: <20190530150015.30995-2-paulmck@linux.ibm.com> (raw)
In-Reply-To: <20190530145942.GA30318@linux.ibm.com>
From: Neeraj Upadhyay <neeraju@codeaurora.org>
On systems whose rcu_node tree has only one node, the
rcu_check_gp_start_stall() function's values of rnp and rnp_root will
be identical. In this case, it clearly does not make sense to release
both rnp->lock and rnp_root->lock, but that is exactly what this function
does in the last early exit. This commit therefore unlocks only rnp->lock
when rnp and rnp_root are equal.
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
---
kernel/rcu/tree_stall.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
index f65a73a97323..065183391f75 100644
--- a/kernel/rcu/tree_stall.h
+++ b/kernel/rcu/tree_stall.h
@@ -630,7 +630,9 @@ static void rcu_check_gp_start_stall(struct rcu_node *rnp, struct rcu_data *rdp,
time_before(j, rcu_state.gp_req_activity + gpssdelay) ||
time_before(j, rcu_state.gp_activity + gpssdelay) ||
atomic_xchg(&warned, 1)) {
- raw_spin_unlock_rcu_node(rnp_root); /* irqs remain disabled. */
+ if (rnp_root != rnp)
+ /* irqs remain disabled. */
+ raw_spin_unlock_rcu_node(rnp_root);
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
return;
}
--
2.17.1
next prev parent reply other threads:[~2019-05-30 15:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 14:59 [PATCH tip/core/rcu 0/9] Miscellaneous fixes for v5.3 Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 1/9] rcu: Dump specified number of blocked tasks Paul E. McKenney
2019-05-30 15:00 ` Paul E. McKenney [this message]
2019-05-30 15:00 ` [PATCH tip/core/rcu 3/9] rcu: Make kfree_rcu() ignore NULL pointers Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 4/9] rcu: Set a maximum limit for back-to-back callback invocation Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 5/9] doc: Remove ".vnet" from paulmck email addresses Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 6/9] rcu: Upgrade sync_exp_work_done() to smp_mb() Paul E. McKenney
2019-06-06 7:48 ` Peter Zijlstra
2019-06-13 22:36 ` Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 7/9] rcu: Fix irritating whitespace error in rcu_assign_pointer() Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 8/9] rcu: Force inlining of rcu_read_lock() Paul E. McKenney
2019-05-30 15:00 ` [PATCH tip/core/rcu 9/9] rcu: Don't return a value from rcu_assign_pointer() 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=20190530150015.30995-2-paulmck@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=neeraju@codeaurora.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.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