Deutsch   English   Français   Italiano  
<vfntgb$vete$1@dont-email.me>

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

Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jseigh <jseigh_es00@xemaps.com>
Newsgroups: comp.lang.c++
Subject: Re: smrproxy v2
Date: Mon, 28 Oct 2024 07:45:15 -0400
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <vfntgb$vete$1@dont-email.me>
References: <vequrc$2o7qc$1@dont-email.me> <verr04$2stfq$1@dont-email.me>
 <verubk$2t9bs$1@dont-email.me> <ves78h$2ugvm$2@dont-email.me>
 <vetj1f$39iuv$1@dont-email.me> <vfh4dh$3bnuq$1@dont-email.me>
 <vfh7mg$3c2hs$1@dont-email.me> <vfm4iq$ill4$1@dont-email.me>
 <vfmesn$k6mn$1@dont-email.me> <vfmf21$kavl$1@dont-email.me>
 <vfmm9a$lob3$1@dont-email.me> <vfn2di$r8ca$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 28 Oct 2024 12:45:16 +0100 (CET)
Injection-Info: dont-email.me; posting-host="45964397d560bbf91335e03cd6cda79a";
	logging-data="1031086"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+OGAmdZdBzakucOiVxWfHM"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:EjTpHwNaFaY7LOuwGIn4ENu8HEo=
In-Reply-To: <vfn2di$r8ca$1@dont-email.me>
Content-Language: en-US
Bytes: 2262

On 10/28/24 00:02, Chris M. Thomasson wrote:
> On 10/27/2024 5:35 PM, jseigh wrote:
>> On 10/27/24 18:32, Chris M. Thomasson wrote:

>>
>> The membar version?  That's a store/load membar so it is expensive.
> 
> I was wondering in your c++ version if you had to use any seq_cst 
> barriers. I think acquire/release should be good enough. Now, when I say 
> C++, I mean pure C++, no calls to FlushProcessWriteBuffers and things 
> like that.
> 
> I take it that your pure C++ version has no atomic RMW, right? Just 
> loads and stores?

While a lock action has acquire memory order semantics, if the
implementation has internal stores, you have to those stores
are complete before any access from the critical section.
So you may need a store/load memory barrier.

For cmpxchg, it has full cst_seq.  For other rmw atomics I don't
know.  I have to ask on c.a.  I think some data dependency and/or
control dependency might factor in.

Joe Seigh