From: "Paul E. McKenney" <paulmck@kernel.org>
To: frederic@kernel.org, rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
rostedt@goodmis.org, "Paul E. McKenney" <paulmck@kernel.org>,
Kent Overstreet <kent.overstreet@linux.dev>
Subject: [PATCH rcu 4/7] rcu: Permit start_poll_synchronize_rcu*() with interrupts disabled
Date: Wed, 9 Oct 2024 11:00:42 -0700 [thread overview]
Message-ID: <20241009180045.777721-4-paulmck@kernel.org> (raw)
In-Reply-To: <2dc6de07-374d-44da-82e9-fa9d9c516b46@paulmck-laptop>
The header comment for both start_poll_synchronize_rcu() and
start_poll_synchronize_rcu_full() state that interrupts must be enabled
when calling these two functions, and there is a lockdep assertion in
start_poll_synchronize_rcu_common() enforcing this restriction. However,
there is no need for this restrictions, as can be seen in call_rcu(),
which does wakeups when interrupts are disabled.
This commit therefore removes the lockdep assertion and the comments.
Reported-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
kernel/rcu/tree.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index a60616e69b663..3d6507d0b8d33 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -4193,7 +4193,6 @@ static void start_poll_synchronize_rcu_common(void)
struct rcu_data *rdp;
struct rcu_node *rnp;
- lockdep_assert_irqs_enabled();
local_irq_save(flags);
rdp = this_cpu_ptr(&rcu_data);
rnp = rdp->mynode;
@@ -4218,9 +4217,6 @@ static void start_poll_synchronize_rcu_common(void)
* grace period has elapsed in the meantime. If the needed grace period
* is not already slated to start, notifies RCU core of the need for that
* grace period.
- *
- * Interrupts must be enabled for the case where it is necessary to awaken
- * the grace-period kthread.
*/
unsigned long start_poll_synchronize_rcu(void)
{
@@ -4241,9 +4237,6 @@ EXPORT_SYMBOL_GPL(start_poll_synchronize_rcu);
* grace period (whether normal or expedited) has elapsed in the meantime.
* If the needed grace period is not already slated to start, notifies
* RCU core of the need for that grace period.
- *
- * Interrupts must be enabled for the case where it is necessary to awaken
- * the grace-period kthread.
*/
void start_poll_synchronize_rcu_full(struct rcu_gp_oldstate *rgosp)
{
--
2.40.1
next prev parent reply other threads:[~2024-10-09 18:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 18:00 [PATCH rcu 0/7] Miscellaneous changes for v6.13 Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 1/7] rcu: Add rcuog kthreads to RCU_NOCB_CPU help text Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 2/7] doc: Add rcuog kthreads to kernel-per-CPU-kthreads.rst Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 3/7] rcu: Allow short-circuiting of synchronize_rcu_tasks_rude() Paul E. McKenney
2024-10-09 18:00 ` Paul E. McKenney [this message]
2024-10-09 18:00 ` [PATCH rcu 5/7] rcutorture: Test start-poll primitives with interrupts disabled Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 6/7] doc: Remove kernel-parameters.txt entry for rcutorture.read_exit Paul E. McKenney
2024-10-09 18:00 ` [PATCH rcu 7/7] rcu-tasks: Remove open-coded one-byte cmpxchg() emulation 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=20241009180045.777721-4-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=frederic@kernel.org \
--cc=kent.overstreet@linux.dev \
--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
all inboxes | Powered by JetHome®