Hi experts:
AFAIK, DMB can only ensure relative orders.
But in https://developer.arm.com/documentation/100941/0101/Barriers?lang=en, it says:
It also ensures that any explicit preceding data or unified cache maintenance operations have completed before any subsequent data accesses are executed.
Does DMB can ensure this? I'am a little confused.
Hi vstehle,
So, the reason for saying that is due to the implemention of data cache maintenance operations.
For D-cache clean and invalidate operations,We can speak DMB is sufficient(no need using DSB).
I want to learn more about how dmb affects cpu's pipeline.
for examle:
memory access instr1;
dmb;
memory access instr2;
Does it mean the cpu will issue instr1/2 in-order?
Thank you very much.
Maybe. The architecture is guaranteeing that, because of the DMB, you can't see the effect of instr2 without also seeing the effect of instr1. But, the architecture doesn't say anything about how that result is achieved.
One possible approach would be to issue instr1, do the operation, and only then issue instr2. Another approach might to be issue them in whatever order, but record a hazard for the load/store to deal with.