Re: [PATCH 2/3] rcu: Defer RCU kthreads wakeup when CPU is dying

From: Frederic Weisbecker
Date: Tue Dec 19 2023 - 10:47:34 EST


On Tue, Dec 19, 2023 at 07:29:23AM -0800, Paul E. McKenney wrote:
> > +static void swake_up_one_online(struct swait_queue_head *wqh)
> > +{
> > + int cpu = get_cpu();
>
> This works because get_cpu() is currently preempt_disable(). If there are plans to
> make get_cpu() be some sort of read lock, we might deadlock when synchronize_rcu()
> is invoked from a CPU-hotplug notifier, correct?
>
> Might this be worth a comment somewhere at some point?

Sure, I can add that.

Thanks.