[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA1PR11MB617147000BECE62798343DF289AB9@IA1PR11MB6171.namprd11.prod.outlook.com>
Date: Thu, 23 Feb 2023 14:36:24 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: "Zhang, Qiang1" <qiang1.zhang@...el.com>,
"paulmck@...nel.org" <paulmck@...nel.org>,
"frederic@...nel.org" <frederic@...nel.org>,
"quic_neeraju@...cinc.com" <quic_neeraju@...cinc.com>,
"joel@...lfernandes.org" <joel@...lfernandes.org>
CC: "rcu@...r.kernel.org" <rcu@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] rcu-tasks: Directly invoke rcuwait_wake_up() in
call_rcu_tasks_generic()
> From: Zhang, Qiang1 <qiang1.zhang@...el.com>
> Sent: Thursday, February 23, 2023 4:43 PM
> To: Zhuo, Qiuxu <qiuxu.zhuo@...el.com>; paulmck@...nel.org;
> frederic@...nel.org; quic_neeraju@...cinc.com; joel@...lfernandes.org
> Cc: rcu@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: RE: [PATCH] rcu-tasks: Directly invoke rcuwait_wake_up() in
> call_rcu_tasks_generic()
>
> > From: Zqiang <qiang1.zhang@...el.com>
> > Sent: Thursday, February 23, 2023 2:30 PM
> > To: paulmck@...nel.org; frederic@...nel.org; quic_neeraju@...cinc.com;
> > joel@...lfernandes.org
> > Cc: rcu@...r.kernel.org; linux-kernel@...r.kernel.org
> > Subject: [PATCH] rcu-tasks: Directly invoke rcuwait_wake_up() in
> > call_rcu_tasks_generic()
> >
> > According to commit '3063b33a347c ("Avoid raw-spinlocked wakeups from
> > call_rcu_tasks_generic()")', the grace-period kthread is delayed to
> > wakeup using irq_work_queue() is because if the caller of
> > call_rcu_tasks_generic() holds a raw spinlock, when the kernel is
> > built with CONFIG_PROVE_RAW_LOCK_NESTING=y, due to a spinlock will
> be
> > hold in wake_up(), so the lockdep splats will happen. but now using
> > rcuwait_wake_up() to wakeup grace-period kthread instead of wake_up(),
> > in
> > rcuwait_wake_up() no spinlock will be acquired, so this commit remove
> > using
> >
> >There are still spinlock-acquisition and spinlock-release invocations within
> the call path from rcuwait_wake_up().
> >
> >rcuwait_wake_up() -> wake_up_process() -> try_to_wake_up(), then:
> >
> > raw_spin_lock_irqsave()
> > ...
> > raw_spin_unlock_irqrestore
>
> Yes, but this is raw_spinlock acquisition and release(note: spinlock will
> convert to sleepable lock in Preempt-RT kernel, but raw spinlock is not
> change).
Hi Qiang,
Yes, you're correct. Thanks for correcting me.
-Qiuxu
> acquire raw_spinlock -> acquire spinlock will trigger lockdep warning.
>
> Thanks
> Zqiang
Powered by blists - more mailing lists