Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vbnnsl$2hvrc$1@dont-email.me>
Deutsch   English   Français   Italiano  
<vbnnsl$2hvrc$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: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups: comp.arch
Subject: Re: arm ldxr/stxr vs cas
Date: Mon, 9 Sep 2024 14:04:21 -0700
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <vbnnsl$2hvrc$1@dont-email.me>
References: <vb4sit$2u7e2$1@dont-email.me>
 <07d60bd0a63b903820013ae60792fb7a@www.novabbs.org>
 <vbc4u3$aj5s$1@dont-email.me>
 <898cf44224e9790b74a0269eddff095a@www.novabbs.org>
 <vbd4k1$fpn6$1@dont-email.me> <vbd91c$g5j0$1@dont-email.me>
 <vbm790$2atfb$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 09 Sep 2024 23:04:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a3d1d68c17abf34994c0af4a498168c2";
	logging-data="2686828"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/LYTicGiv/mvvOP188g4KXNWCFNwOa2Bw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:gZpXBdL1K+e4ecpX9HAAcwubac0=
In-Reply-To: <vbm790$2atfb$2@dont-email.me>
Content-Language: en-US
Bytes: 2157

On 9/9/2024 12:14 AM, Terje Mathisen wrote:
> jseigh wrote:
>>
>> I'm not so sure about making the memory lock granularity same as
>> cache line size but that's an implementation decision I guess.
> 
> Just make sure you never have multiple locks residing inside the same 
> cache line!

Yeah. That would be interestingly bad...

> 
>>
>> I do like the idea of detecting potential contention at the
>> start of LL/SC so you can do back off.  Right now the only way I
>> can detect contention is after the fact when the CAS fails and
>> I probably have the cache line exclusive at that point.  It's
>> pretty problematic.
> 
> I do prefer LOCK XADD instead of CAS (CmpXchg*), because the return 
> value will also tell you which queue entry to pick/work on.
> 
> It will not be optimal when really contended, but at least one 
> participant will make forward progress, and typically several of them.

[...]