Article View: comp.lang.c++
Article #25Re: Consequential RCU
From: Chris M. Thomasson
Date: Wed, 07 Oct 2026 20:13
Date: Wed, 07 Oct 2026 20:13
33 lines
3080 bytes
3080 bytes
On 10/7/2026 6:00 AM, Bonita Montero wrote: > Am 07.10.2026 um 06:33 schrieb Chris M. Thomasson: > >> Bench mark it against Joes atomic ptr that uses DWCAS. ... > > You still dont' understand my idea. Imagine you've got a shared_ptr<X> > and you constantly poll an atomic<shared_ptr<X>> with this to ger a > up to date version of the shared data. With the current atomic impl. > the at<sp<X>> is converted to a sp<X> and then this value is move > -assigned to the sp<X>. This has a big overhad through the atomic > increments of the reference counter. > Imagine now that the at<sp<X>> has an assignment operator that takes > an sp<X> reference directly and not only for it's own type. This ope- > rator could simply compare its own value with the at<sp<X>>'s value > and if this value hasn't changed it does nothing further. This would > mean as long as there are no updates of the at<sp<X>> this operation > would proceed in a nanosecond since the shared data and it's reference > counter's cache lines would remain in shared mode and there would be > no additional cachline loads. > With RCU you take a snapshot of some shared data, read it, mark it > as discadable and the cleanup would take place asynchronously. Huh? A snapshot? What are you talking about? I don't think you know what a read side iteration of say, a single linked list looks like. With > my idea that's not much different since polling and updating the > thread-local "sp<X>" nearly costs nothing. > Huh? You are either making a strong atomic refcount or not.
Technical Details
Message-ID:
<11a695o$370r9$3@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<118f4vv$3plsv$1@dont-email.me> <11a0l38$150m3$1@raubtier-asyl.eternal-september.org> <11a0odn$16c2e$1@dont-email.me> <11a0tf5$18frd$1@raubtier-asyl.eternal-september.org> <11a4i3l$2i092$3@dont-email.me> <11a5fpa$2sm77$1@raubtier-asyl.eternal-september.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!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 Date: Wed, 7 Oct 2026 13:13:43 -0700 Organization: A noiseless patient Spider Lines: 33 Message-ID: <11a695o$370r9$3@dont-email.me> References: <118f4vv$3plsv$1@dont-email.me> <11a0l38$150m3$1@raubtier-asyl.eternal-september.org> <11a0odn$16c2e$1@dont-email.me> <11a0tf5$18frd$1@raubtier-asyl.eternal-september.org> <11a4i3l$2i092$3@dont-email.me> <11a5fpa$2sm77$1@raubtier-asyl.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 07 Oct 2026 20:13:45 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3375977"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19z+ME+WP+eiryHM8Je8eqg3+Hzr1rskkI="; posting-host="9e5dad94c1931ab85b8ca42122ca3b99" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:RgoH2H4zZT+WaZb4dmMk2E3sUwM= sha256:Dg+ntVsaO2qN7JAzVFk+v+rR/NwfxS87sWwMyTOcKgo= sha1:kQunRnxGK/+0HgE9qu9Uv/MSjTM= sha256:2BsDMFxCAjLLodanFScXewLI4dVpq0ZeSeLhpwNFbVE= In-Reply-To: <11a5fpa$2sm77$1@raubtier-asyl.eternal-september.org> Content-Language: en-US