lkml.org 
[lkml]   [2023]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/3] rcu: Equip sleepable RCU with lockdep dependency graph checks
From
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

\
 
 \ /
  Last update: 2023-03-26 23:43    [W:0.062 / U:5.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site