Re: [PATCH hazptr v3 0/4] Hazard pointer updates
From: Bradley Morgan
Date: Mon Oct 26 2026 - 08:34:21 EST
On 26 October 2026 12:01:18 GMT, Kai Ma <kai.ma1@xxxxxxxxxx> wrote:
>"Paul E. McKenney" <paulmck@xxxxxxxxxx> writes:
>
>> On Sun, Oct 11, 2026 at 03:48:46PM -0400, Mathieu Desnoyers wrote:
>>> Hi Paul,
>>>
>>> This series applies on top of "hazptr: handle NULL address in
>>> hazptr_detach" you have in your rcu dev tree.
>>>
>>> This first patch addresses a race identified by Boqun Feng in the
>>> two-phase wildcard scheme. (no change since the last series)
>>>
>>> Patches 2-3 are prerequisites for using ptr_eq() in the 4th patch.
>>> Those were discussed at length in a prior version of hazard pointer
>>> patches.
>>>
>>> Since the last series, I have renamed ptreq.h to ptr_eq.h, addressing
>>> the feedback received from Boqun and Gary.
>>>
>>> Patch 4 introduces a "try acquire" helper to allow the fast path
>>> to not rely on wildcards, while keeping the wildcard forward
>>> progress guarantees in the acquire slow path, used on fast path
>>> failure.
>>
>> I have pulled this in for additional review and testing, thank you!
>> (With Bradley's Reviewed-by on 4/4.) Still subject to rebase, which
>means
>> that I can easily replace it with an updated series from you, if you
>> wish.
>
>Hi Paul, Mathieu, and everyone,
>
>I've been following the hazard pointer work and have done some testing
>on earlier versions. I'd be interested in getting more involved,
>particularly in concurrency correctness testing.
>
>If there are WIP patches or early design discussions where additional
>review or testing would be useful, could you please CC me? I'd
>appreciate the opportunity to get involved earlier and help identify
>potential concurrency issues.
Thanks for taking this job up, what you could do, is make Linus happy, if
that makes sense.
https://lore.kernel.org/all/CAHk-=wjyniJy-CX1muCrsZp-i-sLGRYeRYEPN7sw9orRZUCwag@xxxxxxxxxxxxxx/
>
>Thanks,
>Kai
>
>> But in the meantime, some additional testing. ;-)
>>
>> Thanx, Paul
>>
>>> Thanks,
>>>
>>> Mathieu
>>>
>>> Mathieu Desnoyers (4):
>>> hazptr: Fix two-phase hazptr_synchronize race with detach
>>> ptr_eq.h: Introduce ptr_eq() to preserve address dependency
>>> Documentation: RCU: Refer to ptr_eq()
>>> hazptr: Introduce "try acquire" fast path, fallback to overflow list
>>>
>>> Cc: Paul E. McKenney <paulmck@xxxxxxxxxx>
>>> Cc: Boqun Feng <boqun@xxxxxxxxxx>
>>> Cc: Bradley Morgan <brads@xxxxxxxxxxxxxx>
>>> Cc: Gary Guo <gary@xxxxxxxxxxx>
>>> Cc: <rcu@xxxxxxxxxxxxxxx>
>>> Cc: <lkmm@xxxxxxxxxxxxxxx>
>>> Cc: Lian Wang <lianux.mm@xxxxxxxxx>
>>> Cc: Kunwu Chan <kunwu.chan@xxxxxxxxx>
>>>
>>> Documentation/RCU/rcu_dereference.rst | 38 +++++++-
>>> arch/x86/include/asm/ptr_eq.h | 16 +++
>>> include/asm-generic/Kbuild | 1 +
>>> include/asm-generic/ptr_eq.h | 16 +++
>>> include/linux/hazptr.h | 48 +++++----
>>> include/linux/ptr_eq.h | 63 ++++++++++++
>>> kernel/hazptr.c | 135 +++++++++++++++-----------
>>> 7 files changed, 237 insertions(+), 80 deletions(-)
>>> create mode 100644 arch/x86/include/asm/ptr_eq.h
>>> create mode 100644 include/asm-generic/ptr_eq.h
>>> create mode 100644 include/linux/ptr_eq.h
>>>
>>> --
>>> 2.43.0
>>>
>
>
--- Thanks!