• Consequential RCU Performance

    From Joseph Seigh@3:633/10 to All on Fri Nov 27 12:31:45 2026
    I ran some performance measurements on the reader side, no write
    updates, for a plain linked list traversal, 2 slightly different
    consequential rcu traversals, and traversals using hazard
    pointers w/o and w/ a store/load memory barrier.

    Timings are per node access. Depth is the size of the list.

    count=100000 depth=10
    base: elapsed = 723888 ( 1528564)
    avg = 0.72389 nsecs ( 1.52856 cycles)
    cseq1: elapsed = 739503 ( 1561812)
    avg = 0.73950 nsecs ( 1.56181 cycles)
    cseq2: elapsed = 730236 ( 1542272)
    avg = 0.73024 nsecs ( 1.54227 cycles)
    hzptr: elapsed = 1718280 ( 3628992)
    avg = 1.71828 nsecs ( 3.62899 cycles)
    hzptr_mb: elapsed = 10886003 ( 22990944)
    avg = 10.88600 nsecs (22.99094 cycles)

    base: elapsed = 397189 ( 838878)
    avg = 0.39719 nsecs ( 0.83888 cycles)
    cseq1: elapsed = 634696 ( 1340486)
    avg = 0.63470 nsecs ( 1.34049 cycles)
    cseq2: elapsed = 617216 ( 1303568)
    avg = 0.61722 nsecs ( 1.30357 cycles)
    hzptr: elapsed = 1271179 ( 2684724)
    avg = 1.27118 nsecs ( 2.68472 cycles)
    hzptr_mb: elapsed = 8771772 ( 18525744)
    avg = 8.77177 nsecs (18.52574 cycles)


    count=10000 depth=200
    base: elapsed = 2887587 ( 6098462)
    avg = 1.44379 nsecs ( 3.04923 cycles)
    cseq1: elapsed = 2919783 ( 6166530)
    avg = 1.45989 nsecs ( 3.08326 cycles)
    cseq2: elapsed = 2742185 ( 5791448)
    avg = 1.37109 nsecs ( 2.89572 cycles)
    hzptr: elapsed = 2875948 ( 6073948)
    avg = 1.43797 nsecs ( 3.03697 cycles)
    hzptr_mb: elapsed = 15943183 ( 33671514)
    avg = 7.97159 nsecs (16.83576 cycles)

    base: elapsed = 2093758 ( 4421978)
    avg = 1.04688 nsecs ( 2.21099 cycles)
    cseq1: elapsed = 2191755 ( 4628948)
    avg = 1.09588 nsecs ( 2.31447 cycles)
    cseq2: elapsed = 2130060 ( 4498648)
    avg = 1.06503 nsecs ( 2.24932 cycles)
    hzptr: elapsed = 2334867 ( 4931194)
    avg = 1.16743 nsecs ( 2.46560 cycles)
    hzptr_mb: elapsed = 14738172 ( 31126590)
    avg = 7.36909 nsecs (15.56330 cycles)

    Given the restrictions, consequential rcu
    seems to be on par with hazard pointers.



    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Bonita Montero@3:633/10 to All on Fri Nov 27 19:03:19 2026
    RCU isn't needed. I've shown sth. similar like a shared_ptr<> along with
    sth. similar to an atomic<shared_ptr<>>. With that you poll the "atomic"
    and if both are the same noting happens. That's almost zero execution
    time since the participating cachelines remain in shared_mode; i.e you
    don't have any interconnect-traffic with that.
    shared_ptr<> should have an assignment operator taking an atomic<shared _ptr<>>; just as I did with my shared_obj<> and tshared_obj<>. It should
    to the same comparison as a fast path. With that you can forget the
    whole complexity of RCU. The advantage is that reclaims of the memory
    happen in the moment when a shared_ptr<> is updated from the atomic
    and not delayed.


    Am 27.11.2026 um 18:31 schrieb Joseph Seigh:
    I ran some performance measurements on the reader side, no write
    updates, for a plain linked list traversal, 2 slightly different consequential rcu traversals, and traversals using hazard
    pointers w/o and w/ a store/load memory barrier.

    Timings are per node access.ÿ Depth is the size of the list.

    count=100000 depth=10
    base: elapsed =ÿÿÿÿ 723888 (ÿÿ 1528564)
    avg =ÿ 0.72389 nsecs ( 1.52856 cycles)
    cseq1: elapsed =ÿÿÿÿ 739503 (ÿÿ 1561812)
    avg =ÿ 0.73950 nsecs ( 1.56181 cycles)
    cseq2: elapsed =ÿÿÿÿ 730236 (ÿÿ 1542272)
    avg =ÿ 0.73024 nsecs ( 1.54227 cycles)
    hzptr: elapsed =ÿÿÿ 1718280 (ÿÿ 3628992)
    avg =ÿ 1.71828 nsecs ( 3.62899 cycles)
    hzptr_mb: elapsed =ÿÿ 10886003 (ÿ 22990944)
    avg = 10.88600 nsecs (22.99094 cycles)

    base: elapsed =ÿÿÿÿ 397189 (ÿÿÿ 838878)
    avg =ÿ 0.39719 nsecs ( 0.83888 cycles)
    cseq1: elapsed =ÿÿÿÿ 634696 (ÿÿ 1340486)
    avg =ÿ 0.63470 nsecs ( 1.34049 cycles)
    cseq2: elapsed =ÿÿÿÿ 617216 (ÿÿ 1303568)
    avg =ÿ 0.61722 nsecs ( 1.30357 cycles)
    hzptr: elapsed =ÿÿÿ 1271179 (ÿÿ 2684724)
    avg =ÿ 1.27118 nsecs ( 2.68472 cycles)
    hzptr_mb: elapsed =ÿÿÿ 8771772 (ÿ 18525744)
    avg =ÿ 8.77177 nsecs (18.52574 cycles)


    count=10000 depth=200
    base: elapsed =ÿÿÿ 2887587 (ÿÿ 6098462)
    avg =ÿ 1.44379 nsecs ( 3.04923 cycles)
    cseq1: elapsed =ÿÿÿ 2919783 (ÿÿ 6166530)
    avg =ÿ 1.45989 nsecs ( 3.08326 cycles)
    cseq2: elapsed =ÿÿÿ 2742185 (ÿÿ 5791448)
    avg =ÿ 1.37109 nsecs ( 2.89572 cycles)
    hzptr: elapsed =ÿÿÿ 2875948 (ÿÿ 6073948)
    avg =ÿ 1.43797 nsecs ( 3.03697 cycles)
    hzptr_mb: elapsed =ÿÿ 15943183 (ÿ 33671514)
    avg =ÿ 7.97159 nsecs (16.83576 cycles)

    base: elapsed =ÿÿÿ 2093758 (ÿÿ 4421978)
    avg =ÿ 1.04688 nsecs ( 2.21099 cycles)
    cseq1: elapsed =ÿÿÿ 2191755 (ÿÿ 4628948)
    avg =ÿ 1.09588 nsecs ( 2.31447 cycles)
    cseq2: elapsed =ÿÿÿ 2130060 (ÿÿ 4498648)
    avg =ÿ 1.06503 nsecs ( 2.24932 cycles)
    hzptr: elapsed =ÿÿÿ 2334867 (ÿÿ 4931194)
    avg =ÿ 1.16743 nsecs ( 2.46560 cycles)
    hzptr_mb: elapsed =ÿÿ 14738172 (ÿ 31126590)
    avg =ÿ 7.36909 nsecs (15.56330 cycles)

    Given the restrictions, consequential rcu
    seems to be on par with hazard pointers.




    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Fri Nov 27 13:00:28 2026
    On 11/27/2026 10:03 AM, Bonita Montero wrote:
    RCU isn't needed.
    Sigh.

    [...]

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Bonita Montero@3:633/10 to All on Sat Nov 28 05:55:31 2026
    Am 27.11.2026 um 22:00 schrieb Chris M. Thomasson:

    On 11/27/2026 10:03 AM, Bonita Montero wrote:

    RCU isn't needed.

    Sigh.
    You said that you understand my idea.
    Now I'm sure you don't.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sat Nov 28 12:35:18 2026
    On 11/27/2026 8:55 PM, Bonita Montero wrote:
    Am 27.11.2026 um 22:00 schrieb Chris M. Thomasson:

    On 11/27/2026 10:03 AM, Bonita Montero wrote:

    RCU isn't needed.

    Sigh.
    You said that you understand my idea.
    Now I'm sure you don't.


    I am not sure if you understand your idea and/or RCU... Oh god. You need
    to make a test where there are a lot of reader threads iterating a
    lock-free stack while writers are actively mutating the stack. Your
    readers should never need to use StoreLoad membars or any atomic RMW's,
    etc. Not even LoadStore, well, side note consume got depreciated and
    falls back to a #LoadStore | #LoadLoad iirc.

    Also, the stack does not need any ABA version counts simply because ABA
    will never occur. Can your current work do it?

    RCU can do it. Can yours?

    I have poor mans proxy that works well wrt amortization. Its a poor mans
    RCU.

    https://pastebin.com/raw/CYZ78gVj

    How would your idea fit in here?



    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sat Nov 28 14:14:30 2026
    On 11/27/2026 9:31 AM, Joseph Seigh wrote:
    I ran some performance measurements on the reader side, no write
    updates, for a plain linked list traversal, 2 slightly different consequential rcu traversals, and traversals using hazard
    pointers w/o and w/ a store/load memory barrier.

    Timings are per node access.ÿ Depth is the size of the list.

    count=100000 depth=10
    base: elapsed =ÿÿÿÿ 723888 (ÿÿ 1528564)
    avg =ÿ 0.72389 nsecs ( 1.52856 cycles)
    cseq1: elapsed =ÿÿÿÿ 739503 (ÿÿ 1561812)
    avg =ÿ 0.73950 nsecs ( 1.56181 cycles)
    cseq2: elapsed =ÿÿÿÿ 730236 (ÿÿ 1542272)
    avg =ÿ 0.73024 nsecs ( 1.54227 cycles)
    hzptr: elapsed =ÿÿÿ 1718280 (ÿÿ 3628992)
    avg =ÿ 1.71828 nsecs ( 3.62899 cycles)
    hzptr_mb: elapsed =ÿÿ 10886003 (ÿ 22990944)
    avg = 10.88600 nsecs (22.99094 cycles)

    base: elapsed =ÿÿÿÿ 397189 (ÿÿÿ 838878)
    avg =ÿ 0.39719 nsecs ( 0.83888 cycles)
    cseq1: elapsed =ÿÿÿÿ 634696 (ÿÿ 1340486)
    avg =ÿ 0.63470 nsecs ( 1.34049 cycles)
    cseq2: elapsed =ÿÿÿÿ 617216 (ÿÿ 1303568)
    avg =ÿ 0.61722 nsecs ( 1.30357 cycles)
    hzptr: elapsed =ÿÿÿ 1271179 (ÿÿ 2684724)
    avg =ÿ 1.27118 nsecs ( 2.68472 cycles)
    hzptr_mb: elapsed =ÿÿÿ 8771772 (ÿ 18525744)
    avg =ÿ 8.77177 nsecs (18.52574 cycles)


    count=10000 depth=200
    base: elapsed =ÿÿÿ 2887587 (ÿÿ 6098462)
    avg =ÿ 1.44379 nsecs ( 3.04923 cycles)
    cseq1: elapsed =ÿÿÿ 2919783 (ÿÿ 6166530)
    avg =ÿ 1.45989 nsecs ( 3.08326 cycles)
    cseq2: elapsed =ÿÿÿ 2742185 (ÿÿ 5791448)
    avg =ÿ 1.37109 nsecs ( 2.89572 cycles)
    hzptr: elapsed =ÿÿÿ 2875948 (ÿÿ 6073948)
    avg =ÿ 1.43797 nsecs ( 3.03697 cycles)
    hzptr_mb: elapsed =ÿÿ 15943183 (ÿ 33671514)
    avg =ÿ 7.97159 nsecs (16.83576 cycles)

    base: elapsed =ÿÿÿ 2093758 (ÿÿ 4421978)
    avg =ÿ 1.04688 nsecs ( 2.21099 cycles)
    cseq1: elapsed =ÿÿÿ 2191755 (ÿÿ 4628948)
    avg =ÿ 1.09588 nsecs ( 2.31447 cycles)
    cseq2: elapsed =ÿÿÿ 2130060 (ÿÿ 4498648)
    avg =ÿ 1.06503 nsecs ( 2.24932 cycles)
    hzptr: elapsed =ÿÿÿ 2334867 (ÿÿ 4931194)
    avg =ÿ 1.16743 nsecs ( 2.46560 cycles)
    hzptr_mb: elapsed =ÿÿ 14738172 (ÿ 31126590)
    avg =ÿ 7.36909 nsecs (15.56330 cycles)

    Given the restrictions, consequential rcu
    seems to be on par with hazard pointers.

    Seems so! Even faster on some runs?



    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sat Nov 28 14:26:08 2026
    On 11/28/2026 2:14 PM, Chris M. Thomasson wrote:
    On 11/27/2026 9:31 AM, Joseph Seigh wrote:
    I ran some performance measurements on the reader side, no write
    updates, for a plain linked list traversal, 2 slightly different
    consequential rcu traversals, and traversals using hazard
    pointers w/o and w/ a store/load memory barrier.

    Timings are per node access.ÿ Depth is the size of the list.
    [...]
    count=10000 depth=200
    base: elapsed =ÿÿÿ 2887587 (ÿÿ 6098462)
    avg =ÿ 1.44379 nsecs ( 3.04923 cycles)
    cseq1: elapsed =ÿÿÿ 2919783 (ÿÿ 6166530)
    avg =ÿ 1.45989 nsecs ( 3.08326 cycles)
    cseq2: elapsed =ÿÿÿ 2742185 (ÿÿ 5791448)
    avg =ÿ 1.37109 nsecs ( 2.89572 cycles)
    hzptr: elapsed =ÿÿÿ 2875948 (ÿÿ 6073948)
    avg =ÿ 1.43797 nsecs ( 3.03697 cycles)
    hzptr_mb: elapsed =ÿÿ 15943183 (ÿ 33671514)
    avg =ÿ 7.97159 nsecs (16.83576 cycles)

    base: elapsed =ÿÿÿ 2093758 (ÿÿ 4421978)
    avg =ÿ 1.04688 nsecs ( 2.21099 cycles)
    cseq1: elapsed =ÿÿÿ 2191755 (ÿÿ 4628948)
    avg =ÿ 1.09588 nsecs ( 2.31447 cycles)
    cseq2: elapsed =ÿÿÿ 2130060 (ÿÿ 4498648)
    avg =ÿ 1.06503 nsecs ( 2.24932 cycles)
    hzptr: elapsed =ÿÿÿ 2334867 (ÿÿ 4931194)
    avg =ÿ 1.16743 nsecs ( 2.46560 cycles)
    hzptr_mb: elapsed =ÿÿ 14738172 (ÿ 31126590)
    avg =ÿ 7.36909 nsecs (15.56330 cycles)

    Given the restrictions, consequential rcu
    seems to be on par with hazard pointers.

    Seems so! Even faster on some runs?

    cseq2 seems to be the best for those runs. Humm... How many threads are involved? One per core? Try a list depth of say 1000000?

    say count 10000000, depth 1000000.

    Also, you really should try another test where there are writers humming along. Technically you should be able to have the writers pushing and
    popping. But, the lock-free stack should never need an ABA counter
    because the RCU aspect should never allow a node to be pushed back in
    before its quiescent.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sat Nov 28 14:33:17 2026
    On 11/28/2026 2:26 PM, Chris M. Thomasson wrote:
    On 11/28/2026 2:14 PM, Chris M. Thomasson wrote:
    On 11/27/2026 9:31 AM, Joseph Seigh wrote:
    I ran some performance measurements on the reader side, no write
    updates, for a plain linked list traversal, 2 slightly different
    consequential rcu traversals, and traversals using hazard
    pointers w/o and w/ a store/load memory barrier.

    Timings are per node access.ÿ Depth is the size of the list.
    [...]
    count=10000 depth=200
    base: elapsed =ÿÿÿ 2887587 (ÿÿ 6098462)
    avg =ÿ 1.44379 nsecs ( 3.04923 cycles)
    cseq1: elapsed =ÿÿÿ 2919783 (ÿÿ 6166530)
    avg =ÿ 1.45989 nsecs ( 3.08326 cycles)
    cseq2: elapsed =ÿÿÿ 2742185 (ÿÿ 5791448)
    avg =ÿ 1.37109 nsecs ( 2.89572 cycles)
    hzptr: elapsed =ÿÿÿ 2875948 (ÿÿ 6073948)
    avg =ÿ 1.43797 nsecs ( 3.03697 cycles)
    hzptr_mb: elapsed =ÿÿ 15943183 (ÿ 33671514)
    avg =ÿ 7.97159 nsecs (16.83576 cycles)

    base: elapsed =ÿÿÿ 2093758 (ÿÿ 4421978)
    avg =ÿ 1.04688 nsecs ( 2.21099 cycles)
    cseq1: elapsed =ÿÿÿ 2191755 (ÿÿ 4628948)
    avg =ÿ 1.09588 nsecs ( 2.31447 cycles)
    cseq2: elapsed =ÿÿÿ 2130060 (ÿÿ 4498648)
    avg =ÿ 1.06503 nsecs ( 2.24932 cycles)
    hzptr: elapsed =ÿÿÿ 2334867 (ÿÿ 4931194)
    avg =ÿ 1.16743 nsecs ( 2.46560 cycles)
    hzptr_mb: elapsed =ÿÿ 14738172 (ÿ 31126590)
    avg =ÿ 7.36909 nsecs (15.56330 cycles)

    Given the restrictions, consequential rcu
    seems to be on par with hazard pointers.

    Seems so! Even faster on some runs?

    cseq2 seems to be the best for those runs. Humm... How many threads are involved? One per core? Try a list depth of say 1000000?

    say count 10000000, depth 1000000.

    Also, you really should try another test where there are writers humming along. Technically you should be able to have the writers pushing and popping. But, the lock-free stack should never need an ABA counter
    because the RCU aspect should never allow a node to be pushed back in
    before its quiescent.


    Also, for your hazard pointer test, are you doing its logic on a per
    node basis during iteration?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Bonita Montero@3:633/10 to All on Sun Nov 29 06:47:09 2026
    Am 28.11.2026 um 21:35 schrieb Chris M. Thomasson:

    I am not sure if you understand your idea and/or RCU...

    I understand both and you just don't understand my idea.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sun Nov 29 00:29:34 2026
    On 11/28/2026 9:47 PM, Bonita Montero wrote:
    Am 28.11.2026 um 21:35 schrieb Chris M. Thomasson:

    I am not sure if you understand your idea and/or RCU...

    I understand both and you just don't understand my idea.

    I do. I still want to see it be used for a test where there are a lot of reader threads iterating a lock-free stack while writers are actively
    mutating the stack. Your readers should never need to use StoreLoad
    membars or any atomic RMW's, right?

    Also, the stack does not need any ABA version counts simply because ABA
    will never occur. Can your current work do it?

    RCU can do it. Can yours?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Bonita Montero@3:633/10 to All on Sun Nov 29 09:37:17 2026
    Am 29.11.2026 um 09:29 schrieb Chris M. Thomasson:

    I do. I still want to see it be used for a test where there are a lot of reader threads iterating a lock-free stack while writers are actively mutating the stack. Your readers should never need to use StoreLoad
    membars or any atomic RMW's, right?

    RCU, or my alternative, has nothing to do with lock-free stacks.
    And based on your "criticism," I am quite certain that you haven't
    understood my idea. Why don't you try describing it in your own words.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sun Nov 29 00:43:07 2026
    On 11/29/2026 12:37 AM, Bonita Montero wrote:
    Am 29.11.2026 um 09:29 schrieb Chris M. Thomasson:

    I do. I still want to see it be used for a test where there are a lot
    of reader threads iterating a lock-free stack while writers are
    actively mutating the stack. Your readers should never need to use
    StoreLoad membars or any atomic RMW's, right?

    RCU, or my alternative, has nothing to do with lock-free stacks.
    And based on your "criticism," I am quite certain that you haven't
    understood my idea. Why don't you try describing it in your own words.

    Ever heard of using RCU to iterate a linked data structure without any
    locks, atomic RMW's or StoreLoad membars? The readers go full steam
    ahead while writers can be actively mutating the list. RCU can do it
    fine. Can yours?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sun Nov 29 00:46:30 2026
    On 11/29/2026 12:43 AM, Chris M. Thomasson wrote:
    On 11/29/2026 12:37 AM, Bonita Montero wrote:
    Am 29.11.2026 um 09:29 schrieb Chris M. Thomasson:

    I do. I still want to see it be used for a test where there are a lot
    of reader threads iterating a lock-free stack while writers are
    actively mutating the stack. Your readers should never need to use
    StoreLoad membars or any atomic RMW's, right?

    RCU, or my alternative, has nothing to do with lock-free stacks.
    And based on your "criticism," I am quite certain that you haven't
    understood my idea. Why don't you try describing it in your own words.

    Ever heard of using RCU to iterate a linked data structure without any locks, atomic RMW's or StoreLoad membars? The readers go full steam
    ahead while writers can be actively mutating the list. RCU can do it
    fine. Can yours?

    We already talked about it in that older thread. But you seem to refuse
    to use it for one of the most common use cases that makes RCU shine. Why?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Bonita Montero@3:633/10 to All on Sun Nov 29 09:50:36 2026
    Am 29.11.2026 um 09:43 schrieb Chris M. Thomasson:

    Ever heard of using RCU to iterate a linked data structure
    without any locks, atomic RMW's or StoreLoad membars? ..
    I don't know which pattern you're talking about. But with my idea
    everything which is possible with RCU works also the way I did.
    The memory consumtion of having multiple versions of the data
    around is the same, but with my idea you've an immediate reclaim
    when the last participant abandons ist.

    Now describe the fast path of my idea !


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sun Nov 29 13:17:08 2026
    On 11/29/2026 12:50 AM, Bonita Montero wrote:
    Am 29.11.2026 um 09:43 schrieb Chris M. Thomasson:

    Ever heard of using RCU to iterate a linked data structure
    without any locks, atomic RMW's or StoreLoad membars? ..

    I don't know which pattern you're talking about. But with my idea
    everything which is possible with RCU works also the way I did.

    GOOD! Then show one of its most common usage cases? Iterating a shared
    linked list where the readers fly, and the writers can be actively
    mutating the list without causing the readers any harm.


    The memory consumtion of having multiple versions of the data
    around is the same, but with my idea you've an immediate reclaim
    when the last participant abandons ist.

    Now describe the fast path of my idea !


    Iirc, you are making a basic thread saftey refcount aka shared_ptr that
    can handle strong thread safety without an outright slow path lock every
    time. So, shared_ptr vs atomic<shared_ptr>. But iirc, your impl uses a
    futex. So, it still can wait in the kernel. Did you ever take a look at
    Joe's atomic_ptr work? 100% lock-free.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Joseph Seigh@3:633/10 to All on Sun Nov 29 19:30:02 2026
    On 11/28/26 5:33 PM, Chris M. Thomasson wrote:
    On 11/28/2026 2:26 PM, Chris M. Thomasson wrote:
    On 11/28/2026 2:14 PM, Chris M. Thomasson wrote:
    On 11/27/2026 9:31 AM, Joseph Seigh wrote:
    ...

    cseq2 seems to be the best for those runs. Humm... How many threads
    are involved? One per core? Try a list depth of say 1000000?

    say count 10000000, depth 1000000.

    Also, you really should try another test where there are writers
    humming along. Technically you should be able to have the writers
    pushing and popping. But, the lock-free stack should never need an ABA
    counter because the RCU aspect should never allow a node to be pushed
    back in before its quiescent.


    Also, for your hazard pointer test, are you doing its logic on a per
    node basis during iteration?

    It's per node access. Using it on a linked list of that size wouldn't
    be optimal. I need to rework the test however since you need 2
    hazard pointers to traverse nodes, so I need to add logic to swap the
    hazard poiter holders.

    If I use a wait-free hazard pointer, then only 1 is needed. And it
    would run a bit faster since there wouldn't be conditional branches
    to slow the cpu pipeline.

    At any rate, they're equivalent in performance. The timings were to
    show if there was a situation where there were advantages in using consequential rcu, performance wouldn't be a reason to rule it out.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)