mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC/WIP PATCH 0/4] hazptr: add shared scan path and lockdep use case
@ 2026-09-22  7:09 Kunwu Chan
  2026-09-22  7:09 ` [RFC/WIP PATCH 1/4] hazptr: add shared-scan kthread Kunwu Chan
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Kunwu Chan @ 2026-09-22  7:09 UTC (permalink / raw)
  To: stern, parri.andrea, will, peterz, boqun, npiggin, dhowells,
	j.alglave, luc.maranget, paulmck, corbet, mingo, dave, josh,
	frederic, neeraj.upadhyay, urezki
  Cc: akiyks, dlustig, joelagnelf, skhan, rdunlap, longman, rostedt,
	mathieu.desnoyers, jiangshanlai, qiang.zhang, kunwu.chan,
	include, linux-kernel, linux-arch, lkmm, linux-doc, rcu,
	lianux.mm

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/20260919000056.3132131-26-paulmck@kernel.org/
[2] https://lore.kernel.org/lkml/20250625031101.12555-1-boqun.feng@gmail.com/

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


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

end of thread, other threads:[~2026-09-22  9:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22  7:09 [RFC/WIP PATCH 0/4] hazptr: add shared scan path and lockdep use case Kunwu Chan
2026-09-22  7:09 ` [RFC/WIP PATCH 1/4] hazptr: add shared-scan kthread Kunwu Chan
2026-09-22  8:28   ` Boqun Feng
2026-09-22  8:44     ` Lian Wang
2026-09-22  7:09 ` [RFC/WIP PATCH 2/4] locking/lockdep: use hazptr to wait for dynamic key lookups Kunwu Chan
2026-09-22  8:51   ` Boqun Feng
2026-09-22  7:09 ` [RFC/WIP PATCH 3/4] rcuscale: add hazptr scale type Kunwu Chan
2026-09-22  7:55   ` Boqun Feng
2026-09-22  7:09 ` [RFC/WIP PATCH 4/4] Documentation/litmus-tests: add hazptr acquire-before-scan test Kunwu Chan
2026-09-22  7:48 ` [RFC/WIP PATCH 0/4] hazptr: add shared scan path and lockdep use case Boqun Feng
2026-09-22  9:55   ` KunWu Chan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®