Article View: comp.lang.c++
Article #1035Re: Consequential RCU Performance
From: Bonita Montero
Date: Fri, 27 Nov 2026 18:03
Date: Fri, 27 Nov 2026 18:03
73 lines
4364 bytes
4364 bytes
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. > >
Technical Details
Message-ID:
<11ecgl8$1s72j$1@raubtier-asyl.eternal-september.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mailReferences:
<11eceq2$1rdof$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!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero <Bonita.Montero@gmail.com> Newsgroups: comp.lang.c++ Subject: Re: Consequential RCU Performance Date: Fri, 27 Nov 2026 19:03:19 +0100 Organization: A noiseless patient Spider Lines: 73 Message-ID: <11ecgl8$1s72j$1@raubtier-asyl.eternal-september.org> References: <11eceq2$1rdof$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 27 Nov 2026 18:03:21 +0000 (UTC) Injection-Info: raubtier-asyl.eternal-september.org; logging-data="1973331"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GILUJAsurqGUgPdJhXjA+kUb5jwec6wM="; posting-host="ff90ec162d06c6b9c084a14d378f3a71" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:b5uYQqF3kRcqyO5gWuS4UWtF7AQ= sha256:jFbcpXQYHcapSBFNCwQkeKn3EZ7EUvvs8XKhBwW1JV4= sha1:Vy5PfPwtEr3MtkbNC3cBXYbnjsM= sha256:fckZryUPDWyuM0h5xRXPO5tYPrihXlYhVqSwLsago1g= Content-Language: de-DE In-Reply-To: <11eceq2$1rdof$1@dont-email.me>