🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Chris M. Thomasson Wed, 07 Oct 2026 04:31
Re: Consequential RCU
#5
Author: Chris M. Thomasson
Date: Wed, 07 Oct 2026 04:31
31 lines
2865 bytes
On 10/5/2026 12:23 PM, Bonita Montero wrote:
> Am 05.10.2026 um 19:57 schrieb Chris M. Thomasson:
> 
>> Not sure what you mean. Traditional RCU reads do not need any atomic 
>> RMW's and/or memory barriers (alpha aside for a moment).
> 
> My idea is that a thread periodically polls for updates on shared data.
> Between these updates the data may become stale. The thread-local poin-
> ter is inside a shared_obj<T>. The central threaded analogy for an
> atomic<shared_ptr<T>> is my tshared_obj<T>.
> As long as the shared tshared_obj<T> doesn't change the updates are
> nearly for free. If the object changes the access is locked, but not
> with a separate futex; the pointer itself is the futex, meaning that
> it goes to -1 while there's a deferred update of the reference coun-
> ter the object points to. The pointer changes back to its initial
> value once the change has completed.
> The following diagram shows the micro-benchmark erformance of updating
> a shared_obj<T> periodically from a tshred_obj<T>, which itself doesn't
> change. The scaling is logarithmic. As you see the update is nearly for
> free. The atomic shared_ptr's update is up to more than 10.000 times
> slower:
> 
>      https://ibb.co/nqGHv9pL
> 
> This is the complete source:
[...]

Fwiw, I posted my older proxy collector that can gain RCU like 
performance wrt amortized use in user space. It does not use CAS, just 
fetch_add.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads