* [PATCH] rcu-tasks: Update comments in call_rcu_tasks_generic()
@ 2026-07-13 10:31 Zqiang
0 siblings, 0 replies; only message in thread
From: Zqiang @ 2026-07-13 10:31 UTC (permalink / raw)
To: paulmck, frederic, neeraj.upadhyay, joelagnelf, urezki, boqun
Cc: qiang.zhang, rcu, linux-kernel
Currently, the comments: "We can't create the thread unless interrupts
are enabled." from 'commit 4929c913bda5 ("rcu: Make call_rcu_tasks()
tolerate first call with irqs disabled")', now the kthread creation
has been move to core_initcall() time from 'commit c63eb17ff06d
("rcu: Create call_rcu_tasks() kthread at boot time")', and use the
irq_work does deferred wakeup. this commit therefore update comments
in call_rcu_tasks_generic().
Signed-off-by: Zqiang <qiang.zhang@linux.dev>
---
kernel/rcu/tasks.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index a2ca79d1dd6a..089a0d5a5cc9 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -395,7 +395,11 @@ static void call_rcu_tasks_generic(struct rcu_head *rhp, rcu_callback_t func,
raw_spin_unlock_irqrestore(&rtp->cbs_gbl_lock, flags);
}
rcu_read_unlock();
- /* We can't create the thread unless interrupts are enabled. */
+ // We can't create the kthread with interrupts disabled,
+ // or a spinlock might be held, the kthread creation has
+ // been move to core_initcall() time.
+ // at the same time, use the irq_work does deferred wakeup
+ // to avoid potential lockdep splat.
if (needwake && READ_ONCE(rtp->kthread_ptr))
irq_work_queue(&rtpcp->rtp_irq_work);
}
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-13 10:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13 10:31 [PATCH] rcu-tasks: Update comments in call_rcu_tasks_generic() Zqiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox