Skip to content

Detect SRCU related deadlocks

Boqun Feng kvm linux-mm lkml rcu 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3locking/lockdep: Introduce lock_sync()include/linux/lockdep.h kernel/locking/lockdep.c+39 -01 reply
2/3rcu: Equip sleepable RCU with lockdep dependency graph checksinclude/linux/srcu.h kernel/rcu/srcutiny.c kernel/rcu/srcutree.c+25 -215 replies
3/3WIP: locking/lockdep: selftests: Add selftests for SRCUlib/locking-selftest.c+71 -00 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchPaul E. McKenneyWaiman Long
1/3A-b
2/3A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] Detect SRCU related deadlocks

This is actually a leftover of the recursive read deadlock detection patchset:

	https://lore.kernel.org/lkml/[email protected]/

I resolve comments then and add more test cases, and hopefully this can fulfill the request from KVM:

	https://lore.kernel.org/lkml/[email protected]/

;-)

The patch #3 is now WIP for two reasons:

* It may conflicts with Paul's patchset on removing CONFIG_SRCU

* I haven't found a proper way to "reinit" srcu_struct when
lockdep selftest runs: cleanup_srcu_struct() needs workqueue however the tests can run before there is one.

Anyway, these selftests prove the detection actually works. And as always, feedbacks and comments are welcome!

Regards,
Boqun

Boqun Feng (3):
locking/lockdep: Introduce lock_sync()
rcu: Equip sleepable RCU with lockdep dependency graph checks
WIP: locking/lockdep: selftests: Add selftests for SRCU

 include/linux/lockdep.h  |  5 +++
 include/linux/srcu.h     | 23 +++++++++++--
 kernel/locking/lockdep.c | 34 +++++++++++++++++++
 kernel/rcu/srcutiny.c    |  2 ++
 kernel/rcu/srcutree.c    |  2 ++
 lib/locking-selftest.c   | 71 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 135 insertions(+), 2 deletions(-)
Signature · 1 line
2.38.1