[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <456f6c15-3043-6da2-349d-c0c3880c1a55@redhat.com>
Date: Mon, 16 Jan 2023 18:36:43 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: paulmck@...nel.org, Boqun Feng <boqun.feng@...il.com>
Cc: linux-kernel@...r.kernel.org, rcu@...r.kernel.org,
kvm@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Josh Triplett <josh@...htriplett.org>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
David Woodhouse <dwmw2@...radead.org>, seanjc@...gle.com,
Joel Fernandes <joel@...lfernandes.org>,
Matthew Wilcox <willy@...radead.org>,
Michal Luczaj <mhal@...x.co>
Subject: Re: [PATCH 2/3] rcu: Equip sleepable RCU with lockdep dependency
graph checks
On 1/13/23 20:11, Paul E. McKenney wrote:
> On Fri, Jan 13, 2023 at 10:05:22AM -0800, Boqun Feng wrote:
>> On Fri, Jan 13, 2023 at 03:29:49AM -0800, Paul E. McKenney wrote:
>> I prefer that the first two patches go through your tree, because it
>> reduces the synchronization among locking, rcu and KVM trees to the
>> synchronization betwen rcu and KVM trees.
>
> Very well, I have queued and pushed these with the usual wordsmithing,
> thank you!
I'm worried about this case:
CPU 0 CPU 1
-------------------- ------------------
lock A srcu lock B
srcu lock B lock A
srcu unlock B unlock A
unlock A srcu unlock B
While a bit unclean, there is nothing that downright forbids this; as
long as synchronize_srcu does not happen inside lock A, no deadlock can
occur.
However, if srcu is replaced with an rwlock then lockdep should and does
report a deadlock. Boqun, do you get a false positive or do your
patches correctly suppress this?
Paolo
Powered by blists - more mailing lists