Article View: comp.lang.c++
Article #1152Re: async SMR in Relacy...
From: Chris M. Thomasson
Date: Sat, 05 Dec 2026 00:55
Date: Sat, 05 Dec 2026 00:55
39 lines
3001 bytes
3001 bytes
On 12/4/2026 4:52 PM, Chris M. Thomasson wrote:
> On 12/3/2026 2:59 PM, Joseph Seigh wrote:
>> On 12/2/26 10:58 PM, Chris M. Thomasson wrote:
>>> Okay, this is a test unit for Relacy that shows how to use SMR
>>> without a heavy StoreLoad for the readers. However, it requires a
>>> very special fence on the scan side. Relacy models it via
>>> rl::systemwide_fence($); Over on Windows that can be
>>> FlushProcessWriteBuffers(), so this is specialized for certain
>>> workloads. However, its damn near RCU performance, not quite, but
>>> almost there. Again for read heavy loads. It neat how Relacy can
>>> model and simulate it! Passing tests...
>>>
>>> Still not exactly sure how Joe is getting 100% wait free SMR loads,
>>> no double check! But that is another story. Anyway, ponder on this:
>>>
>>
>> Magic. Seriously, I don't have to do anything. Stuff just shows up
>> eventually. I used to do POC's but there doesn't seem to be any
>> causal relationship on those affecting if and when something would show
>> up in actual implementations.
>>
>> And it's not even the fastest possible wait-free hazard pointer at that.
>
> Still wondering how you can do it without a double check. Unless each
> thread had version counters all setup, or some way to check for epochs?
> Can you do it without ANY loop in the smr_load function?
Afaict, the closest I can find is the following but, it has a loop:
block* get_protected(block** ptr, int index) {
int prevEra = reservations[tid][index];
while (true) {
block* ret = *ptr;
int newEra = global_era;
if (prevEra == newEra) return ret;
reservations[tid][index] = newEra;
prevEra = newEra;
}
}
Technical Details
Message-ID:
<11evndr$2831l$2@dont-email.me>Path:
mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11eqpcm$3sboq$1@dont-email.me> <11ess8e$upj2$1@dont-email.me> <11evn84$2831l$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.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: async SMR in Relacy... Date: Fri, 4 Dec 2026 16:55:22 -0800 Organization: A noiseless patient Spider Lines: 39 Message-ID: <11evndr$2831l$2@dont-email.me> References: <11eqpcm$3sboq$1@dont-email.me> <11ess8e$upj2$1@dont-email.me> <11evn84$2831l$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 05 Dec 2026 00:55:24 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2362421"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+POP0BdSE/dYlp1BckHnU+LRbD4dkjQRY="; posting-host="2b66e3b9720a5537939852d7aa1235e3" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:Z0ocCmCbS3v6QCvuTG3yEYCibDY= sha256:NfXKt53unA20VySbmPtBcW2ZhHQFvC4AfroBnIBtrbY= sha1:yr7EPXHf7Q7NQ0nwqNDlDjRP/qs= sha256:oeuJtKdcU11W4rrcGDAgH+sDiot78x17xAZgauYnVTI= Content-Language: en-US In-Reply-To: <11evn84$2831l$1@dont-email.me>