Article View: comp.lang.c++
Article #9Re: Consequential RCU
From: Bonita Montero
Date: Wed, 07 Oct 2026 13:00
Date: Wed, 07 Oct 2026 13:00
23 lines
2769 bytes
2769 bytes
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. With my idea that's not much different since polling and updating the thread-local "sp<X>" nearly costs nothing.
Technical Details
Message-ID:
<11a5fpa$2sm77$1@raubtier-asyl.eternal-september.org>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!raubtier-asyl.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>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!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero <Bonita.Montero@gmail.com> Newsgroups: comp.lang.c++ Subject: Re: Consequential RCU Date: Wed, 7 Oct 2026 15:00:26 +0200 Organization: A noiseless patient Spider Lines: 23 Message-ID: <11a5fpa$2sm77$1@raubtier-asyl.eternal-september.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 07 Oct 2026 13:00:26 +0000 (UTC) Injection-Info: raubtier-asyl.eternal-september.org; logging-data="3037415"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DcOPH2qRNtSQKGWuglMj6nAR/fofQ1PQ="; posting-host="d35ffcc5ea14d50a950c736b996ddccc" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:hXGpiVM7coGt1FB4TWUS71ku8r8= sha256:ZrS6twrarFgHck7q7sEvNY3RjmSlHWJJ85c+kZjB2ZA= sha1:+Gn3u2ETr96+rKCKbUdRJ1QifRQ= sha256:ZpZrCTNyPOn7o9nzTO1CKXJxpN71RVSgZbAXsY8vOgA= Content-Language: de-DE In-Reply-To: <11a4i3l$2i092$3@dont-email.me>