🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++
Article #1042

Re: Consequential RCU Performance

#1042
From: Chris M. Thomasson
Date: Sat, 28 Nov 2026 22:33
52 lines
3495 bytes
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?
Technical Details
Message-ID: <11efkre$30100$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11eceq2$1rdof$1@dont-email.me> <11efjo9$2vmag$1@dont-email.me> <11efke4$2vtr5$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups: comp.lang.c++
Subject: Re: Consequential RCU Performance
Date: Sat, 28 Nov 2026 14:33:17 -0800
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <11efkre$30100$1@dont-email.me>
References: <11eceq2$1rdof$1@dont-email.me> <11efjo9$2vmag$1@dont-email.me>
 <11efke4$2vtr5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 28 Nov 2026 22:33:18 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3146752"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19OEreFj+PjXAMQvDPRHny9zm+wqBUPXhE="; posting-host="2631cfc9bd423e6e37c1b359040b83d4"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:EgOtGytisTR7hqRkZgddc+KkALA= sha256:FjjkMpGVBKlCipK+JAFAq5j4roDL1b+L0iHhifqeEsw=
	sha1:spN3cAdjrQt/wO76AGIL4UyMjxg= sha256:92PIszpg50tyjghuhMyg82b/8fVMPNmCNKsS90ASfJA=
In-Reply-To: <11efke4$2vtr5$1@dont-email.me>
Content-Language: en-US