mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
rcu-tasks: Update comments in call_rcu_tasks_generic()
This commit updates the comment "We can't create the thread unless interrupts are enabled." from 'commit4929c913bd("rcu: Make call_rcu_tasks() tolerate first call with irqs disabled")' to be more clear and also to cover deferred wakeup and to take into account the fact that kthread creation has been move to core_initcall() time by 'commitc63eb17ff0("rcu: Create call_rcu_tasks() kthread at boot time")'. Signed-off-by: Zqiang <qiang.zhang@linux.dev> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
a781301250
commit
5976694882
|
|
@ -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 because a
|
||||
// scheduler spinlock might be held, so kthread creation is deferred
|
||||
// until core_initcall() time. Similarly, wakeups are deferred using
|
||||
// irq_work in order to avoid potential scheduler-lock-deadlock
|
||||
// lockdep splats.
|
||||
if (needwake && READ_ONCE(rtp->kthread_ptr))
|
||||
irq_work_queue(&rtpcp->rtp_irq_work);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user