Deutsch   English   Français   Italiano  
<vivuml$2k486$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jseigh <jseigh_es00@xemaps.com>
Newsgroups: comp.arch
Subject: Re: portable proxy collector test...
Date: Fri, 6 Dec 2024 17:43:33 -0500
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <vivuml$2k486$1@dont-email.me>
References: <viquuj$16v40$1@dont-email.me> <vivkqq$2hpdg$1@dont-email.me>
 <vivpcg$2in59$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 06 Dec 2024 23:43:34 +0100 (CET)
Injection-Info: dont-email.me; posting-host="2f0d2f946a092e3143c80c1fdadc7861";
	logging-data="2756870"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+zQ7bx/PGNQ/LO55keHfSi"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:0ovfUvm3LKRhh47VWZ7thSlYeFo=
In-Reply-To: <vivpcg$2in59$2@dont-email.me>
Content-Language: en-US
Bytes: 2112

On 12/6/24 16:12, Chris M. Thomasson wrote:
> On 12/6/2024 11:55 AM, Brett wrote:
>> Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
>>> I am wondering if anybody can try to compile and run this C++11 code of
>>> mine for a portable word-based proxy collector, a sort of poor mans RCU,
>>> on an ARM based system? I don't have access to one. I am interested in
>>> the resulting output.
>>
>> https://godbolt.org
>>
>>> https://pastebin.com/raw/CYZ78gVj
>>> (raw text link, no ads... :^)
> [...]
> 
> It seems that all of the atomics are LDREX/STREX wrt fetch_add/sub . 
> Even with relaxed memory order. Are the LDREX/STREX similar to the LOCK 
> prefix on an x86/64?
> 
> https://godbolt.org/z/EPGYWve71
> 
> It has loops for this in the ASM code. Adding a loop in there can change 
> things from wait-free to lock-free. Humm...
> 
Which compiler did you choose.  armv8?  Try ARM64.

The newer arms have new atomics
cas and atomic fetch ops.

LDREX/STREX is the older load store reserved.
On the newer stuff it's ldxr/stxr not ldrex/strex.