Article View: comp.lang.c++
Article #1041Re: Consequential RCU Performance
From: Chris M. Thomasson
Date: Sat, 28 Nov 2026 22:26
Date: Sat, 28 Nov 2026 22:26
48 lines
3247 bytes
3247 bytes
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.
Technical Details
Message-ID:
<11efke4$2vtr5$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-mailReferences:
<11eceq2$1rdof$1@dont-email.me> <11efjo9$2vmag$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:26:08 -0800 Organization: A noiseless patient Spider Lines: 48 Message-ID: <11efke4$2vtr5$1@dont-email.me> References: <11eceq2$1rdof$1@dont-email.me> <11efjo9$2vmag$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:26:13 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3143525"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18aK6lzpZDS47jJzzLKI95gGeGHp2w5Q0E="; posting-host="2631cfc9bd423e6e37c1b359040b83d4" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Br9trL2l5RfQnuLhuzXrTHSnigY= sha256:abRNiBg7lbJ4+j14Ko9RPTynbvuIUDeLviK4UPNGPWA= sha1:kNcQDUxPlIKb36k2AL1/UwK27GY= sha256:rPBfy3qXalHsIJJ6kcLudYoS4WX2+HxR4HgsM3LGSeU= Content-Language: en-US In-Reply-To: <11efjo9$2vmag$1@dont-email.me>