5 ms·
Java for ARM is really exciting. I'm wondering however how Java Memory Model implementation performs on ARM. JMM offers pretty strong guarantees via the fundam
by bitcharmer 6y ago
Java for ARM is really exciting. I'm wondering however how Java Memory Model implementation performs on ARM.
JMM offers pretty strong guarantees via the fundamental happens-before relationships in program behaviour. It's relatively easy to implement on x86's strong TSO, but ARM is extremely problematic to offer the same guarantees on.
Can't wait to run some concurrency benchmarks on this platform.
- monocasa 6y agoPowerPC has pretty much the same memory model as the ARM variants, so it's a more or less solved problem thankfully.
- dralley 6y agoOn that subject, as someone that knows nothing about either POWER (or Aarch64), I'm curious if anyone could describe the ways in which they are different?
- aph_at_redhat 6y agoThe most important practical difference is that Power PC is not multi-copy atomic. That is to say, "[the PPC] memory system does not guarantee that a write becomes visible to all other hardware threads at the same time point." AArch64 does guarantee this property, although it was not documented as doing so in the first release of its specification. For this reason PPC has to emit some extra StoreLoad memory fences. (See "A Tutorial Introduction to the ARM and POWER Relaxed Memory Models" by Luc Maranget, Susmit Sarkar and Peter Sewell, but be aware that the AArch64 specification has changed since that paper was written. Our work has resulted in Arm clarifying the AArch64 specification in a couple of places, for which I'm grateful.)
- aph_at_redhat 6y agoWell, maybe PPC doesn't strictly have to do this, but the PPC maintainers decided it would be surprising if it didn't.
- monocasa 6y agoDifferent from each other, or from x86?
- dralley 6y agoFrom each other.
- monocasa 6y agoThere's not a whole lot different practically. The big thing being that PowerPC32 is basically free for a PowerPC64 design, but 32 mode is pretty costly for an arm64 design. Oh, and the PowerPC MMU format is famously terrible, and even the new fixed version is somehow still awful.
- asveikau 6y agoI don't understand entirely. Hasn't there been java on arm for some time? j2me? Android? Granted, android has its own bytecode and runtime. Does it attempt to conform to the memory model? I imagine there is little reason not to.
- kccqzy 6y agoThe Aarch64 ISA was designed to map easily to the C++11 memory model. The C++11 memory model is heavily inspired by the Java memory model. You have nothing to worry about.