• Re: Wait-free Hazard Pointers Using Std Atomics

    From jseigh@jseigh_es00@xemaps.com to comp.lang.c++ on Sun Jul 20 11:25:45 2025
    From Newsgroup: comp.lang.c++

    On 7/4/25 17:56, Chris M. Thomasson wrote:
    On 6/29/2025 9:16 AM, jseigh wrote:
    On 6/28/25 18:41, Chris M. Thomasson wrote:

    How does the technique adapt to different methods of creating linked
    data structures?


    Working through that.-a It's low priority work.-a There's a bunch of
    Java stuff I need to get to.

    I did figure out how to do certain operations on linked lists. It could
    work on other linked data structures provided the operations met certain criteria. Something to use if I can think of any interesting
    applications.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to comp.lang.c++ on Mon Jul 21 13:36:34 2025
    From Newsgroup: comp.lang.c++

    On 7/20/2025 8:25 AM, jseigh wrote:
    On 7/4/25 17:56, Chris M. Thomasson wrote:
    On 6/29/2025 9:16 AM, jseigh wrote:
    On 6/28/25 18:41, Chris M. Thomasson wrote:

    How does the technique adapt to different methods of creating linked
    data structures?


    Working through that.-a It's low priority work.-a There's a bunch of
    Java stuff I need to get to.

    I did figure out how to do certain operations on linked lists.-a It could work on other linked data structures provided the operations met certain criteria.-a Something to use if I can think of any interesting
    applications.

    Iirc, you made an old post on c.p.t many years ago about a somewhat
    general case using RCU and/or your atomic-ptr-plus proxy collector, for
    linked node based tree algorithms in the past? Is this related to it?
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From jseigh@jseigh_es00@xemaps.com to comp.lang.c++ on Tue Jul 22 16:17:05 2025
    From Newsgroup: comp.lang.c++

    On 7/21/25 16:36, Chris M. Thomasson wrote:
    On 7/20/2025 8:25 AM, jseigh wrote:
    On 7/4/25 17:56, Chris M. Thomasson wrote:
    On 6/29/2025 9:16 AM, jseigh wrote:
    On 6/28/25 18:41, Chris M. Thomasson wrote:

    How does the technique adapt to different methods of creating
    linked data structures?


    Working through that.-a It's low priority work.-a There's a bunch of
    Java stuff I need to get to.

    I did figure out how to do certain operations on linked lists.-a It could
    work on other linked data structures provided the operations met certain
    criteria.-a Something to use if I can think of any interesting
    applications.

    Iirc, you made an old post on c.p.t many years ago about a somewhat
    general case using RCU and/or your atomic-ptr-plus proxy collector, for linked node based tree algorithms in the past? Is this related to it?

    No, that is unrelated. A lot of partial copy on writes IIRC.

    Also unrelated - I found an old post of mine suggesting using
    a queue to avoid syscalls like io_uring does.

    https://groups.google.com/g/comp.arch/c/32oorU6fTts/m/d-dYChmSosEJ

    Seems to be a twenty year delay on when I predict things and
    they happen.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From jseigh@jseigh_es00@xemaps.com to comp.lang.c++ on Sun Jul 27 13:13:40 2025
    From Newsgroup: comp.lang.c++

    On 5/26/25 17:58, jseigh wrote:
    and asymmetric memory barriers of course.

    https://threadnought.wordpress.com/2025/05/26/wait-free-hazard-pointers- using-std-atomics/

    Looks like it runs faster without the conditional branch.

    Not sure it's a new idea.-a The only wait-free version of hazard pointers I've seen so far involves a storage to storage move instruction which
    might not be available on all platforms.



    For some reason I though restartable sequences (RSEQ) couldn't be
    inlined but apparently it can. I did a quick and dirty perf test
    of hp protect and it looks like it runs 3x faster. But this will
    only work on linux and only with asymmetric memory barriers.

    Joe Seigh
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to comp.lang.c++ on Sun Jul 27 13:36:39 2025
    From Newsgroup: comp.lang.c++

    On 7/27/2025 10:13 AM, jseigh wrote:
    On 5/26/25 17:58, jseigh wrote:
    and asymmetric memory barriers of course.

    https://threadnought.wordpress.com/2025/05/26/wait-free-hazard-
    pointers- using-std-atomics/

    Looks like it runs faster without the conditional branch.

    Not sure it's a new idea.-a The only wait-free version of hazard pointers
    I've seen so far involves a storage to storage move instruction which
    might not be available on all platforms.



    For some reason I though restartable sequences (RSEQ) couldn't be
    inlined but apparently it can.-a I did a quick and dirty perf test
    of hp protect and it looks like it runs 3x faster.-a But this will
    only work on linux and only with asymmetric memory barriers.

    Please excuse my ignorance, by why only on Linux? windows has asymmetric memory barriers...
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From jseigh@jseigh_es00@xemaps.com to comp.lang.c++ on Mon Jul 28 07:11:01 2025
    From Newsgroup: comp.lang.c++

    On 7/27/25 16:36, Chris M. Thomasson wrote:
    On 7/27/2025 10:13 AM, jseigh wrote:
    On 5/26/25 17:58, jseigh wrote:
    and asymmetric memory barriers of course.

    https://threadnought.wordpress.com/2025/05/26/wait-free-hazard-
    pointers- using-std-atomics/

    Looks like it runs faster without the conditional branch.

    Not sure it's a new idea.-a The only wait-free version of hazard pointers >>> I've seen so far involves a storage to storage move instruction which
    might not be available on all platforms.



    For some reason I though restartable sequences (RSEQ) couldn't be
    inlined but apparently it can.-a I did a quick and dirty perf test
    of hp protect and it looks like it runs 3x faster.-a But this will
    only work on linux and only with asymmetric memory barriers.

    Please excuse my ignorance, by why only on Linux? windows has asymmetric memory barriers...

    No restartable sequences on windows AFAIK.
    --- Synchronet 3.21a-Linux NewsLink 1.2