linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Detect SRCU related deadlocks
@ 2023-01-13  6:59 Boqun Feng
  2023-01-13  6:59 ` [PATCH 1/3] locking/lockdep: Introduce lock_sync() Boqun Feng
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Boqun Feng @ 2023-01-13  6:59 UTC (permalink / raw)
  To: linux-kernel, rcu, kvm
  Cc: Peter Zijlstra, Ingo Molnar, Will Deacon, Waiman Long,
	Boqun Feng, Lai Jiangshan, Paul E. McKenney, Josh Triplett,
	Steven Rostedt, Mathieu Desnoyers, David Woodhouse,
	Paolo Bonzini, seanjc, Joel Fernandes, Matthew Wilcox,
	Michal Luczaj

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

	https://lore.kernel.org/lkml/20180411135647.21496-1-boqun.feng@gmail.com/

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

	https://lore.kernel.org/lkml/a14a13a690277d4cc95a4b26aa2d9a4d9b392a74.camel@infradead.org/

;-)

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(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2023-02-04  2:34 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13  6:59 [PATCH 0/3] Detect SRCU related deadlocks Boqun Feng
2023-01-13  6:59 ` [PATCH 1/3] locking/lockdep: Introduce lock_sync() Boqun Feng
2023-01-16 21:56   ` Waiman Long
2023-01-13  6:59 ` [PATCH 2/3] rcu: Equip sleepable RCU with lockdep dependency graph checks Boqun Feng
2023-01-13 11:29   ` Paul E. McKenney
2023-01-13 18:05     ` Boqun Feng
2023-01-13 19:11       ` Paul E. McKenney
2023-01-16 17:36         ` Paolo Bonzini
2023-01-16 17:54           ` Boqun Feng
2023-01-16 18:56             ` Paul E. McKenney
2023-01-16 22:01   ` Waiman Long
2023-01-13  6:59 ` [PATCH 3/3] WIP: locking/lockdep: selftests: Add selftests for SRCU Boqun Feng
2023-01-13 12:46 ` [PATCH 0/3] KVM: Make use of SRCU deadlock detection support David Woodhouse
2023-01-13 12:46   ` [PATCH 1/3] KVM: Show lockdep the kvm->mutex vs. kvm->srcu ordering rule David Woodhouse
2023-01-13 12:46   ` [PATCH 2/3] KVM: selftests: Use enum for test numbers in xen_shinfo_test David Woodhouse
2023-01-13 17:13     ` David Woodhouse
2023-01-13 12:46   ` [PATCH 3/3] KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test David Woodhouse
2023-02-04  2:32     ` Sean Christopherson
2023-02-04  2:34   ` [PATCH 0/3] KVM: Make use of SRCU deadlock detection support Sean Christopherson
     [not found] ` <20230113130330.1027-1-hdanton@sina.com>
2023-01-13 17:58   ` [PATCH 2/3] rcu: Equip sleepable RCU with lockdep dependency graph checks Boqun Feng
     [not found]   ` <20230113235809.1085-1-hdanton@sina.com>
2023-01-14  0:17     ` Boqun Feng
     [not found]     ` <20230114071832.1162-1-hdanton@sina.com>
2023-01-14  7:32       ` Boqun Feng
     [not found]       ` <20230114102659.1219-1-hdanton@sina.com>
2023-01-15  0:18         ` Boqun Feng
2023-01-13 23:57 ` [PATCH 4/3] locking/lockdep: Improve the deadlock scenario print for sync and read lock Boqun Feng
2023-01-16 22:21   ` Waiman Long
2023-01-16 22:35     ` Boqun Feng
2023-01-17  1:36       ` Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).