[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201015095235.GT2651@hirez.programming.kicks-ass.net>
Date: Thu, 15 Oct 2020 11:52:35 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: Boqun Feng <boqun.feng@...il.com>, Qian Cai <cai@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...nel.org>, x86 <x86@...nel.org>,
linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [tip: locking/core] lockdep: Fix lockdep recursion
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 = READ_ONCE(rnp->ofl_seq);
> if (firstseq & 0x1)
> - while (firstseq == smp_load_acquire(&rnp->ofl_seq))
> - schedule_timeout_idle(1); // Can't wake unless RCU is watching.
> + smp_cond_load_relaxed(&rnp->ofl_seq, VAL == firstseq);
My bad, that should be: VAL != firstseq.
> smp_mb(); // Pair with barriers used when updating ->ofl_seq to even values.
> raw_spin_lock(&rcu_state.ofl_lock);
> raw_spin_lock_irq_rcu_node(rnp);
Powered by blists - more mailing lists