Hi all, This RFC/WIP extends the current v3 hazptr implementation [1] and adapts the lockdep use case from Boqun Feng's earlier hazptr series [2] to the current hazptr API.
[1] https://lore.kernel.org/all/[email protected]/ [2] https://lore.kernel.org/lkml/[email protected]/ The lockdep conversion replaces the expedited RCU wait in lockdep_unregister_key() with hazptr_synchronize() for dynamic-key lookups. The series also adds a shared-scan kthread for concurrent hazptr_synchronize() callers, rcuscale support, and an LKMM test for the acquire-before-scan ordering. I tested the lockdep path on a 96-CPU ARM64 KVM guest with Boqun's original mq workload [2]. With a multiqueue virtio-net device (`-device virtio-net-pci,mq=on,vectors=6`), tc mq add/del x100 completed in 850 ms with hazptr and 860 ms with expedited RCU. The rmmod workload similarly showed no measurable difference (1360 ms vs. 1380 ms over 10 runs). There were no crashes or hangs in these tests. This is still RFC/WIP. I would appreciate feedback on the shared-scan design and the lockdep conversion. Kunwu Chan (4): hazptr: add shared-scan kthread locking/lockdep: use hazptr to wait for dynamic key lookups rcuscale: add hazptr scale type Documentation/litmus-tests: add hazptr acquire-before-scan test .../hazptr/hazptr-acquire-before-scan.litmus | 49 ++++ kernel/hazptr.c | 274 ++++++++++++++++++ kernel/locking/lockdep.c | 30 +- kernel/rcu/rcuscale.c | 65 ++++- 4 files changed, 407 insertions(+), 11 deletions(-) create mode 100644 Documentation/litmus-tests/hazptr/hazptr-acquire-before-scan.litmus -- 2.43.0

