On 27 September 2026 17:20:36 BST, Mathieu Desnoyers <[email protected]> wrote: >On 2026-09-27 12:15, Boqun Feng wrote: >> On Sun, Sep 27, 2026 at 11:51:27AM -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. >>> >> >> Thank you! That looks good from a quick look. I will give a deep look >> later on (I was traveling). >> >> For the following versions/patches, could you also Cc Kuwu Chan and >> Liang Wang (Cced) ? They are helping on the scan thread and lockdep >> integration, so it'll be good to keep them in the loop. Thank you! > >Noted, I've added them to my patch commit messages, so they should >be there for the next round. >
Maybe my tests could help you? Sorry to impede but the things I sent may need a but if discussi9n around it >> >>> 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. >>> >>> 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. >>> >> >> Nice! I want to point out that later on if the reader can handle the >> race with the updater (i.e. the readers don't need the progress >> guarantees from hazptr, then we can expose a hazptr_try_acquire() for >> exactly that). Although I do have some design trade-off questions for >> patch 4. > >Sure, if you have a use-case in mind I'm interested to hear about it! > >Thanks, > >Mathieu > >> >> Regards, >> Boqun >> >>> Thanks, >>> >>> Mathieu >>> >>> Mathieu Desnoyers (4): >>> hazptr: Fix two-phase hazptr_synchronize race with detach >>> compiler.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 <[email protected]> >>> Cc: Boqun Feng <[email protected]> >>> Cc: Bradley Morgan <[email protected]> >>> Cc: Gary Guo <[email protected]> >>> Cc: <[email protected]> >>> Cc: <[email protected]> >>> >>> Documentation/RCU/rcu_dereference.rst | 38 +++++++- >>> include/linux/compiler.h | 63 ++++++++++++ >>> include/linux/hazptr.h | 47 +++++---- >>> kernel/hazptr.c | 135 >+++++++++++++++----------- >>> 4 files changed, 203 insertions(+), 80 deletions(-) >>> >>> -- >>> 2.43.0 >>> > > > --- Thanks! https://lore.kernel.org/all/[email protected]/

