top | item 31414038

(no title)

giyanani | 3 years ago

The memory ordering is different, too. Apple gets around it by adding support for intel ordering in the m1 cpus, and then changing to that mode on a per-process basis.

https://twitter.com/ErrataRob/status/1331735383193903104

If you mix arm and x86 code inside a process, you can't tell which ordering to use.

discuss

order

saagarjha|3 years ago

God I wish people stopped sharing this thread because it’s full of things that just cause confusion. To respond to your point though it’s a per-thread flag that the kernel can flip for you if Apple had wanted it to. It’s probably better to just run the ARM code with full TSO, though; the performance penalty is like 10-15% for most code, which is probably less than making a system call into the kernel to be rescheduled with the right ordering whenever you wanted to switch. That doesn’t change the fact that the real challenge here is ABI, not ordering.