Deutsch   English   Français   Italiano  
<vftnat$27k8k$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: Wed, 30 Oct 2024 12:36:45 -0400
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <vftnat$27k8k$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>
 <vfntgb$vete$1@dont-email.me> <vfp1c3$16d9f$1@dont-email.me>
 <vfpd43$186t4$1@dont-email.me> <vfporh$1dqvu$2@dont-email.me>
 <vfqgrc$1hfo1$2@dont-email.me> <vfrlm1$1np4q$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Oct 2024 17:36:46 +0100 (CET)
Injection-Info: dont-email.me; posting-host="a37275ffab632ae3cdb481c13372e4d8";
	logging-data="2347284"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX199gZzQXb6EkeBfKxYHryRJ"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:MQkUWxFtftXGX5Dton93T5hV5AI=
Content-Language: en-US
In-Reply-To: <vfrlm1$1np4q$2@dont-email.me>
Bytes: 2326

On 10/29/24 17:56, Chris M. Thomasson wrote:
> On 10/29/2024 4:27 AM, jseigh wrote:

>>
>> Yes.  It's just an optimization. The reader threads could read
>> from the global epoch but it would be in a separate cache line
>> and be an extra dependent load.  So one dependent load and
>> same cache line.
> 
> Are you taking advantage of the fancy alignment capabilities of C++?
> 
> https://en.cppreference.com/w/cpp/language/alignas
> 
> and friends? They seem to work fine wrt the last time I checked them.
> 
> It's nice to have a standard way to pad and align on cache line 
> boundaries. :^)

It's target processor dependent.  You need to query the cache line size
and pass to compile as a define variable.

There's supposed to be built in define that would be target system
dependent but it's not implemented.