7 ms·
> Moving everything to ARM will not be cheap I thought the same thing until I saw how well Apple's Rosetta 2 works. Now that we've seen what's possible, I'm ho
by als0 6y ago
> Moving everything to ARM will not be cheap
I thought the same thing until I saw how well Apple's Rosetta 2 works. Now that we've seen what's possible, I'm hoping that the x64 emulation in Windows/ARM will rise to the challenge set by Apple.
- mhh__ 6y agoAnd to be able to use Rosetta 2 I only have to spend the combined value of all my computers again? Double that if I want the same amount of RAM and storage as I have now
- als0 6y agoYou don't have to use Rosetta 2 - that was an example of a good implementation. I did mention the announced x64 emulation on Windows, but that's only a preview release at the moment. If you're a Linux user the only thing I'm aware of is QEMU TCG but there might be faster projects out there.
- mhh__ 6y agoMy point was that it doesn't suggest cheap any time soon.
- monocasa 6y agoI imagine Apple has a patent on the cute optional TSO memory model that makes it work.
- duskwuff 6y agoI don't think they do. The memory model itself isn't patentable; the TSO memory model already existed on x86, as well as many other architectures before that. Having an option to enable/disable TSO might be patentable, but it'd be a stretch; there's plenty of precedent for allowing a CPU to select between operating modes at runtime. (For example, many PowerPC parts could be switched between little-endian and big-endian modes at runtime, and some developers even used this to assist in emulating x86!) What's more likely is simply that other ARM SoC vendors aren't implementing their own cores (e.g. they're using a standard Cortex-Ax design from ARM), so they can't add deeply integrated features like TSO themselves.
- monocasa 6y agoI mean, selectable, cheap, memory model changes are novel and I pretty much guarantee they have patents on some aspects of it. Depending on the patent there might be some cute ways to work around it, but it's going to take some work on your part. They might even have patents on other attempts to get to the same effect that they might have tried out. PowerPC's biendianness would be patentable too if it had been an absolutely ancient technique about as old as computers themselves. And there's people other than ARM and Apple making ARM cores. Samsung's Exynos M5 should be coming out before too long for instance.
- gpderetta 6y agoI believe POWER also has selectable TSO Mode. So did older sparks (before TSO became the only mode available).
- monocasa 6y ago> I believe POWER also has selectable TSO Mode It does not.
- gpderetta 6y agoI believe it is called "Strong Access Ordering Mode" and it is defined in the ISA, but I can't find any good reference online. edit: this patent from 2012 from IBM references SAO: https://patents.google.com/patent/WO2012101538A1/en https://patents.google.com/patent/WO2012101538A1/en
- anarazel 6y agoSparc did optional TSO 20+ years ago...
- marcan_42 6y agoThey don't. A few other ARM CPUs implement TSO already (by default, due to their design), it's just not an architectural/standard feature that software can rely on.
- monocasa 6y agoRight, other cores implement TSO by (because a stupid simple core will be TSO sort of by default), but it's a pretty unique thing to have a runtime TSO switch. And it'd be incredibly stupid of them not to have a patent on it unless there's some clear prior art for exactly their implementation since we're in a first to file system in the US. Otherwise they're asking for someone else to patent it and troll them for an easy cash grab.
- anarazel 6y agoSparc v9 had registers to change the consistency model. 1993. See "5.2.1.4 PSTATE_mem_model (MM)" in https://cr.yp.to/2005-590/sparcv9.pdf https://cr.yp.to/2005-590/sparcv9.pdf
- monocasa 6y agoFair enough. That's what I get for talking in absolute terms.
- saagarjha 6y agoNvidia’s Carmel is sequentially consistent.
- monocasa 6y agoMy whole point as been around _selectable_ consistency, which is a rarity. Yes, there are many cores with stricter than necessary consistency, but very very very few allow you to switch consistency models at runtime. Hence my original statement about the "cute _optional_ TSO memory model".
- saagarjha 6y agoTSO is just one part of Rosetta. Another significant performance win is that it’s sloppy with keeping the runtime out of the emulated address space to save on a (slow) software MMU, which may not be feasible for other implementations.
- monocasa 6y agoI'm not following, why would it require a soft MMU? They're not changing out the semantics of the virtual address space. And the runtime isn't a security boundary so there's no reason to hide it. I also don't see how what you're saying requires hardware support.
- saagarjha 6y agoThis is less a security thing and more an emulation fidelity thing. A “true” emulator will make itself invisible from the running program so that it runs as if it was on the real system, but a Rosetta program can do things like modify the emulator or control flow in ways that are not possible on a real system because the runtime is mapped into the same address space without protection. For most Mac software this is not a problem because they will not try to access wild memory or enforce mappings, but on other platforms I can see this being infeasible (on Linux I can imagine programs that get upset if they can’t control the full address space outside of what the kernel reserves, for example).
- monocasa 6y agoIt's extremely standard for user space only emulators to not attempt to hide themselves from the emulated code. Every implementation I can think of that derives from HP Dynamo ideas doesn't attempt to since fundamentally you need to have the translated code cache mapped anyway to be able to execute it. You're never going to be able to hide yourself completely wiht any useful perf without transmeta like special mmu hardware that has completely separate translations for I and D fetches. You can see how the build directories for qemu are {architecture}-softmmu for the full system emulators, and {architecture}-linux-user for the user mode emulators for another example of this but with Linux binary emulation.