Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: jseigh Newsgroups: comp.arch Subject: Re: Arm ldaxr / stxr loop question Date: Tue, 12 Nov 2024 18:55:42 -0500 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: <3lGdnVvGQIAq2676nZ2dnZfqnPGdnZ2d@supernews.com> <0TmdnaP6ecXoQ676nZ2dnZfqn_adnZ2d@supernews.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 13 Nov 2024 00:55:43 +0100 (CET) Injection-Info: dont-email.me; posting-host="00afc918acf78a828dbeea42ac8af8d4"; logging-data="1939252"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19I0bn8RtG2u46ykbNDY4WR" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:KmPtTZhv7n63qGRlYovQmgDo2Ds= Content-Language: en-US In-Reply-To: <0TmdnaP6ecXoQ676nZ2dnZfqn_adnZ2d@supernews.com> Bytes: 2717 On 11/12/24 18:02, aph@littlepinkcloud.invalid wrote: > Chris M. Thomasson wrote: >> On 11/12/2024 4:14 AM, aph@littlepinkcloud.invalid wrote: >>> >>> One other thing to be aware of is that the StoreLoad barrier needed >>> for sequential consistency is logically part of an LDAR, not part of a >>> STLR. This is an optimization, because the purpose of a StoreLoad in >>> that situation is to prevent you from seeing your own stores to a >>> location before everyone else sees them. >> >> Fwiw, even x86/x64 needs StoreLoad when an algorithm depends on a >> store followed by a load to another location to hold. LoadStore is >> not strong enough. The SMR algorithm needs that. Iirc, Peterson's >> algorithms needs it as well. > > That's right, but my point about LDAR on AArch64 is that you can get > sequential consistency without needing a StoreLoad. LDAR can peek > inside the store buffer and, much of the time, determine that it isn't > necessary to do a flush. I don't know if Arm were the first to do > this, but I don't recall seeing it before. It is a brilliant idea. > > Andrew. Does ARM use acquire and release differently than everyone else? I'm not sure where StoreLoad fits in with those. Joe Seigh