Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-28 Thread Paul E. McKenney
On Tue, Oct 27, 2020 at 03:31:41PM -0400, Qian Cai wrote: > On Mon, 2020-10-12 at 11:11 +0800, Boqun Feng wrote: > > Hi, > > > > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > > > The following commit has

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-28 Thread Qian Cai
On Wed, 2020-10-28 at 08:53 -0700, Paul E. McKenney wrote: > On Wed, Oct 28, 2020 at 10:39:47AM -0400, Qian Cai wrote: > > On Tue, 2020-10-27 at 20:01 -0700, Paul E. McKenney wrote: > > > If I have the right email thread associated with the right fixes, these > > > commits in -rcu should be what

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-28 Thread Paul E. McKenney
On Wed, Oct 28, 2020 at 10:39:47AM -0400, Qian Cai wrote: > On Tue, 2020-10-27 at 20:01 -0700, Paul E. McKenney wrote: > > If I have the right email thread associated with the right fixes, these > > commits in -rcu should be what you are looking for: > > > > 73b658b6b7d5 ("rcu: Prevent

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-28 Thread Qian Cai
On Tue, 2020-10-27 at 20:01 -0700, Paul E. McKenney wrote: > If I have the right email thread associated with the right fixes, these > commits in -rcu should be what you are looking for: > > 73b658b6b7d5 ("rcu: Prevent lockdep-RCU splats on lock acquisition/release") > 626b79aa935a ("x86/smpboot:

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-28 Thread Paul E. McKenney
On Wed, Oct 28, 2020 at 04:08:59PM -0400, Qian Cai wrote: > On Wed, 2020-10-28 at 08:53 -0700, Paul E. McKenney wrote: > > On Wed, Oct 28, 2020 at 10:39:47AM -0400, Qian Cai wrote: > > > On Tue, 2020-10-27 at 20:01 -0700, Paul E. McKenney wrote: > > > > If I have the right email thread associated

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-27 Thread Qian Cai
On Mon, 2020-10-12 at 11:11 +0800, Boqun Feng wrote: > Hi, > > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > > The following commit has been merged into the locking/core branch of tip: > > > > > >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-15 Thread Paul E. McKenney
On Thu, Oct 15, 2020 at 09:15:01AM -0700, Paul E. McKenney wrote: > On Thu, Oct 15, 2020 at 11:49:26AM +0200, Peter Zijlstra wrote: > > On Wed, Oct 14, 2020 at 08:41:28PM -0700, Paul E. McKenney wrote: [ . . . ] > > --- a/kernel/rcu/tree.c > > +++ b/kernel/rcu/tree.c > > @@ -1764,8 +1764,7 @@

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-15 Thread Paul E. McKenney
On Thu, Oct 15, 2020 at 11:52:35AM +0200, Peter Zijlstra wrote: > On Thu, Oct 15, 2020 at 11:49:26AM +0200, Peter Zijlstra wrote: > > --- a/kernel/rcu/tree.c > > +++ b/kernel/rcu/tree.c > > @@ -1764,8 +1764,7 @@ static bool rcu_gp_init(void) > > smp_mb(); // Pair with barriers used

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-15 Thread Paul E. McKenney
On Thu, Oct 15, 2020 at 11:50:33AM +0200, Peter Zijlstra wrote: > On Thu, Oct 15, 2020 at 11:49:26AM +0200, Peter Zijlstra wrote: > > --- a/kernel/rcu/tree.c > > +++ b/kernel/rcu/tree.c > > @@ -1143,13 +1143,15 @@ bool rcu_lockdep_current_cpu_online(void > > struct rcu_data *rdp; > >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-15 Thread Paul E. McKenney
On Thu, Oct 15, 2020 at 11:49:26AM +0200, Peter Zijlstra wrote: > On Wed, Oct 14, 2020 at 08:41:28PM -0700, Paul E. McKenney wrote: > > So the (untested) patch below (on top of the other two) moves the delay > > to rcu_gp_init(), in particular, to the first loop that traverses only > > the leaf

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-15 Thread Peter Zijlstra
On Thu, Oct 15, 2020 at 11:49:26AM +0200, Peter Zijlstra wrote: > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -1764,8 +1764,7 @@ static bool rcu_gp_init(void) > smp_mb(); // Pair with barriers used when updating ->ofl_seq to > odd values. > firstseq =

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-15 Thread Peter Zijlstra
On Thu, Oct 15, 2020 at 11:49:26AM +0200, Peter Zijlstra wrote: > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -1143,13 +1143,15 @@ bool rcu_lockdep_current_cpu_online(void > struct rcu_data *rdp; > struct rcu_node *rnp; > bool ret = false; > + unsigned long seq; >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-15 Thread Peter Zijlstra
On Wed, Oct 14, 2020 at 08:41:28PM -0700, Paul E. McKenney wrote: > So the (untested) patch below (on top of the other two) moves the delay > to rcu_gp_init(), in particular, to the first loop that traverses only > the leaf rcu_node structures handling CPU hotplug. > > Hopefully getting closer!

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-14 Thread Paul E. McKenney
On Wed, Oct 14, 2020 at 04:55:53PM -0700, Paul E. McKenney wrote: > On Thu, Oct 15, 2020 at 12:39:54AM +0200, Peter Zijlstra wrote: > > On Wed, Oct 14, 2020 at 03:11:52PM -0700, Paul E. McKenney wrote: > > > On Wed, Oct 14, 2020 at 11:53:19PM +0200, Peter Zijlstra wrote: > > > > On Wed, Oct 14,

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-14 Thread Peter Zijlstra
On Wed, Oct 14, 2020 at 03:11:52PM -0700, Paul E. McKenney wrote: > On Wed, Oct 14, 2020 at 11:53:19PM +0200, Peter Zijlstra wrote: > > On Wed, Oct 14, 2020 at 11:34:05AM -0700, Paul E. McKenney wrote: > > > commit 7deaa04b02298001426730ed0e6214ac20d1a1c1 > > > Author: Paul E. McKenney > > >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-14 Thread Peter Zijlstra
On Wed, Oct 14, 2020 at 11:34:05AM -0700, Paul E. McKenney wrote: > commit 7deaa04b02298001426730ed0e6214ac20d1a1c1 > Author: Paul E. McKenney > Date: Tue Oct 13 12:39:23 2020 -0700 > > rcu: Prevent lockdep-RCU splats on lock acquisition/release > > The rcu_cpu_starting() and

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-14 Thread Paul E. McKenney
On Thu, Oct 15, 2020 at 12:39:54AM +0200, Peter Zijlstra wrote: > On Wed, Oct 14, 2020 at 03:11:52PM -0700, Paul E. McKenney wrote: > > On Wed, Oct 14, 2020 at 11:53:19PM +0200, Peter Zijlstra wrote: > > > On Wed, Oct 14, 2020 at 11:34:05AM -0700, Paul E. McKenney wrote: > > > > commit

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-14 Thread Paul E. McKenney
On Wed, Oct 14, 2020 at 11:53:19PM +0200, Peter Zijlstra wrote: > On Wed, Oct 14, 2020 at 11:34:05AM -0700, Paul E. McKenney wrote: > > commit 7deaa04b02298001426730ed0e6214ac20d1a1c1 > > Author: Paul E. McKenney > > Date: Tue Oct 13 12:39:23 2020 -0700 > > > > rcu: Prevent lockdep-RCU

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-14 Thread Paul E. McKenney
On Tue, Oct 13, 2020 at 12:30:25PM -0700, Paul E. McKenney wrote: > On Tue, Oct 13, 2020 at 09:26:50AM -0700, Paul E. McKenney wrote: > > On Tue, Oct 13, 2020 at 01:25:44PM +0200, Peter Zijlstra wrote: > > > On Tue, Oct 13, 2020 at 12:44:50PM +0200, Peter Zijlstra wrote: > > > > On Tue, Oct 13,

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-13 Thread Paul E. McKenney
On Tue, Oct 13, 2020 at 09:26:50AM -0700, Paul E. McKenney wrote: > On Tue, Oct 13, 2020 at 01:25:44PM +0200, Peter Zijlstra wrote: > > On Tue, Oct 13, 2020 at 12:44:50PM +0200, Peter Zijlstra wrote: > > > On Tue, Oct 13, 2020 at 12:34:06PM +0200, Peter Zijlstra wrote: > > > > On Mon, Oct 12, 2020

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-13 Thread Paul E. McKenney
On Tue, Oct 13, 2020 at 01:25:44PM +0200, Peter Zijlstra wrote: > On Tue, Oct 13, 2020 at 12:44:50PM +0200, Peter Zijlstra wrote: > > On Tue, Oct 13, 2020 at 12:34:06PM +0200, Peter Zijlstra wrote: > > > On Mon, Oct 12, 2020 at 02:28:12PM -0700, Paul E. McKenney wrote: > > > > It is certainly an

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-13 Thread Boqun Feng
On Tue, Oct 13, 2020 at 12:27:15PM +0200, Peter Zijlstra wrote: > On Mon, Oct 12, 2020 at 11:11:10AM +0800, Boqun Feng wrote: > > > I think this happened because in this commit debug_lockdep_rcu_enabled() > > didn't adopt to the change that made lockdep_recursion a percpu > > variable? > > > >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-13 Thread Paul E. McKenney
On Tue, Oct 13, 2020 at 12:44:50PM +0200, Peter Zijlstra wrote: > On Tue, Oct 13, 2020 at 12:34:06PM +0200, Peter Zijlstra wrote: > > On Mon, Oct 12, 2020 at 02:28:12PM -0700, Paul E. McKenney wrote: > > > It is certainly an accident waiting to happen. Would something like > > > the following

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-13 Thread Peter Zijlstra
On Tue, Oct 13, 2020 at 12:44:50PM +0200, Peter Zijlstra wrote: > On Tue, Oct 13, 2020 at 12:34:06PM +0200, Peter Zijlstra wrote: > > On Mon, Oct 12, 2020 at 02:28:12PM -0700, Paul E. McKenney wrote: > > > It is certainly an accident waiting to happen. Would something like > > > the following

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-13 Thread Peter Zijlstra
On Tue, Oct 13, 2020 at 12:34:06PM +0200, Peter Zijlstra wrote: > On Mon, Oct 12, 2020 at 02:28:12PM -0700, Paul E. McKenney wrote: > > It is certainly an accident waiting to happen. Would something like > > the following make sense? > > Sadly no. > > >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-13 Thread Peter Zijlstra
On Mon, Oct 12, 2020 at 02:28:12PM -0700, Paul E. McKenney wrote: > It is certainly an accident waiting to happen. Would something like > the following make sense? Sadly no. > > > diff --git a/kernel/rcu/tree.c

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-13 Thread Peter Zijlstra
On Mon, Oct 12, 2020 at 11:11:10AM +0800, Boqun Feng wrote: > I think this happened because in this commit debug_lockdep_rcu_enabled() > didn't adopt to the change that made lockdep_recursion a percpu > variable? > > Qian, mind to try the following? > > Although, arguably the problem still

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-12 Thread Paul E. McKenney
On Mon, Oct 12, 2020 at 11:11:10AM +0800, Boqun Feng wrote: > Hi, > > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > > The following commit has been merged into the locking/core branch of tip: > > > > > >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-12 Thread Qian Cai
On Mon, 2020-10-12 at 11:11 +0800, Boqun Feng wrote: > Hi, > > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > > The following commit has been merged into the locking/core branch of tip: > > > > > >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-11 Thread Boqun Feng
Hi, On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > The following commit has been merged into the locking/core branch of tip: > > > > Commit-ID: 4d004099a668c41522242aa146a38cc4eb59cb1e > > Gitweb:

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Paul E. McKenney
On Fri, Oct 09, 2020 at 01:54:34PM -0400, Qian Cai wrote: > On Fri, 2020-10-09 at 13:36 -0400, Qian Cai wrote: > > Back to x86, we have: > > > > start_secondary() > > smp_callin() > > apic_ap_setup() > > setup_local_APIC() > > printk() in certain conditions. > > > > which is

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Qian Cai
On Fri, 2020-10-09 at 13:36 -0400, Qian Cai wrote: > Back to x86, we have: > > start_secondary() > smp_callin() > apic_ap_setup() > setup_local_APIC() > printk() in certain conditions. > > which is before smp_store_cpu_info(). > > Can't we add a rcu_cpu_starting() at the

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Paul E. McKenney
On Fri, Oct 09, 2020 at 01:36:47PM -0400, Qian Cai wrote: > On Fri, 2020-10-09 at 18:23 +0200, Peter Zijlstra wrote: > > On Fri, Oct 09, 2020 at 06:58:37AM -0700, Paul E. McKenney wrote: > > > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > > > On Fri, 2020-10-09 at 07:58 +,

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Qian Cai
On Fri, 2020-10-09 at 18:23 +0200, Peter Zijlstra wrote: > On Fri, Oct 09, 2020 at 06:58:37AM -0700, Paul E. McKenney wrote: > > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > > > The following commit has

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Paul E. McKenney
On Fri, Oct 09, 2020 at 06:23:52PM +0200, Peter Zijlstra wrote: > On Fri, Oct 09, 2020 at 06:58:37AM -0700, Paul E. McKenney wrote: > > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > > > The following commit

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Peter Zijlstra
On Fri, Oct 09, 2020 at 06:58:37AM -0700, Paul E. McKenney wrote: > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > > The following commit has been merged into the locking/core branch of tip: > > > > > >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Paul E. McKenney
On Fri, Oct 09, 2020 at 11:30:38AM -0400, Qian Cai wrote: > On Fri, 2020-10-09 at 06:58 -0700, Paul E. McKenney wrote: > > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > > > The following commit has been

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Qian Cai
On Fri, 2020-10-09 at 06:58 -0700, Paul E. McKenney wrote: > On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > > The following commit has been merged into the locking/core branch of tip: > > > > > > Commit-ID:

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Paul E. McKenney
On Fri, Oct 09, 2020 at 09:41:24AM -0400, Qian Cai wrote: > On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > > The following commit has been merged into the locking/core branch of tip: > > > > Commit-ID: 4d004099a668c41522242aa146a38cc4eb59cb1e > > Gitweb: > >

Re: [tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread Qian Cai
On Fri, 2020-10-09 at 07:58 +, tip-bot2 for Peter Zijlstra wrote: > The following commit has been merged into the locking/core branch of tip: > > Commit-ID: 4d004099a668c41522242aa146a38cc4eb59cb1e > Gitweb: > https://git.kernel.org/tip/4d004099a668c41522242aa146a38cc4eb59cb1e >

[tip: locking/core] lockdep: Fix lockdep recursion

2020-10-09 Thread tip-bot2 for Peter Zijlstra
The following commit has been merged into the locking/core branch of tip: Commit-ID: 4d004099a668c41522242aa146a38cc4eb59cb1e Gitweb: https://git.kernel.org/tip/4d004099a668c41522242aa146a38cc4eb59cb1e Author:Peter Zijlstra AuthorDate:Fri, 02 Oct 2020 11:04:21 +02:00

[tip: locking/core] lockdep: Fix lockdep recursion

2020-10-07 Thread tip-bot2 for Peter Zijlstra
The following commit has been merged into the locking/core branch of tip: Commit-ID: a046a86082cc3db21e98188a3ddda4e36288f5bf Gitweb: https://git.kernel.org/tip/a046a86082cc3db21e98188a3ddda4e36288f5bf Author:Peter Zijlstra AuthorDate:Fri, 02 Oct 2020 11:04:21 +02:00