From the latest Mysql 8.0.23(2021/1/18) release, we found there are the same optimization towards MY_RELAX_CPU. See below
In current situation for Mariadb server, we introduced
define UT_RELAX_CPU() _asm_ _volatile_ ("":::"memory")
like https://jira.mariadb.org/browse/MDEV-23633 .
For the specific instruction, such as DMB/DSB/ISB(https://developer.arm.com/documentation/dui0489/c/CIHGHHIE), we need to deep analysis or test on ARM, which one is good for ARM.
So this JIRA ticket will trace the test result and following fix/upgrade for this goal. But let's wait for whether this extra operation is visible in some benchmarks.