[aarch64-port-dev ] RFR: aarch64: minor improvements of atomic operations

Andrew Haley aph at redhat.com
Tue Nov 12 09:25:18 UTC 2019


On 11/12/19 8:37 AM, Yangfei (Felix) wrote:
> This has been discussed somewhere before: https://patchwork.kernel.org/patch/3575821/ 
> Let's keep the current status for safe.  

Yes.

It's been interesting to see the progress of this patch. I don't think
it's the first time that someone has been tempted to change this code
to make it "more efficient".

I wonder if we could perhaps add a comment to that code so that it
doesn't happen again. I'm not sure exactly what the patch should say
beyond "do not touch". Perhaps something along the lines of "Do not
touch this code unless you have at least Black Belt, 4th Dan in memory
ordering."  :-)

More seriously, maybe simply "Note that memory_order_conservative
requires a full barrier after atomic stores. See
https://patchwork.kernel.org/patch/3575821/"

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the aarch64-port-dev mailing list