From: Boqun Feng <boqun@kernel.org>
To: Kunwu Chan <kunwu.chan@gmail.com>
Cc: stern@rowland.harvard.edu, parri.andrea@gmail.com,
will@kernel.org, peterz@infradead.org, npiggin@gmail.com,
dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr,
paulmck@kernel.org, corbet@lwn.net, mingo@redhat.com,
dave@stgolabs.net, josh@joshtriplett.org, frederic@kernel.org,
neeraj.upadhyay@kernel.org, urezki@gmail.com, akiyks@gmail.com,
dlustig@nvidia.com, joelagnelf@nvidia.com,
skhan@linuxfoundation.org, rdunlap@infradead.org,
longman@redhat.com, rostedt@goodmis.org,
mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
qiang.zhang@linux.dev, include@grrlz.net,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
lkmm@lists.linux.dev, linux-doc@vger.kernel.org,
rcu@vger.kernel.org, lianux.mm@gmail.com
Subject: Re: [RFC/WIP PATCH 0/4] hazptr: add shared scan path and lockdep use case
Date: Tue, 22 Sep 2026 09:48:23 +0200 [thread overview]
Message-ID: <arIyx4BaA2eArvYM@MacBook-0RXW5> (raw)
In-Reply-To: <20260922070950.4173245-1-kunwu.chan@gmail.com>
On Tue, Sep 22, 2026 at 03:09:46PM +0800, Kunwu Chan wrote:
> Hi all,
>
Hello Kunwu,
> 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.
>
Thanks a lot for picking up this, much appreciated.
Do you happen to play a bit with rcuscale and see any performance
difference between hazptr_synchronize() vs synchronize_{s}rcu() on
various configs?
> 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.
>
You could also use /proc/interrupts to measure the IPI counts during the
whole operation, and you should be able to see the difference there.
Regards,
Boqun
> 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
>
next prev parent reply other threads:[~2026-09-22 7:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 7:09 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 ` Boqun Feng [this message]
2026-09-22 9:55 ` [RFC/WIP PATCH 0/4] hazptr: add shared scan path and lockdep use case KunWu Chan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=arIyx4BaA2eArvYM@MacBook-0RXW5 \
--to=boqun@kernel.org \
--cc=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=dave@stgolabs.net \
--cc=dhowells@redhat.com \
--cc=dlustig@nvidia.com \
--cc=frederic@kernel.org \
--cc=include@grrlz.net \
--cc=j.alglave@ucl.ac.uk \
--cc=jiangshanlai@gmail.com \
--cc=joelagnelf@nvidia.com \
--cc=josh@joshtriplett.org \
--cc=kunwu.chan@gmail.com \
--cc=lianux.mm@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkmm@lists.linux.dev \
--cc=longman@redhat.com \
--cc=luc.maranget@inria.fr \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=neeraj.upadhyay@kernel.org \
--cc=npiggin@gmail.com \
--cc=parri.andrea@gmail.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=qiang.zhang@linux.dev \
--cc=rcu@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=skhan@linuxfoundation.org \
--cc=stern@rowland.harvard.edu \
--cc=urezki@gmail.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®