News for hackers. Stuff that matters.
Re:Tesla’s Neural Processor In The FSD Chip by dragontamer on Thursday September 26, 2019 @06:46PM (#21086410)
PCIe is probably the "standard" connection that I'd expect in a system today. 16x lanes of PCIe 3.0 will provide over 15 GBps of bandwidth at ~microsecond of latency. PCIe 3.0 as a protocol is complex enough to handle atomics these days (atomic-compare and swap), which allows for high-speed coordination and collaboration, very much akin to multi-core programming on cpu-to-cpu.

"Exotic" connections go beyond PCIe. You could theoretically share DDR4 RAM. With this, its probably more natural to have "cache-coherent" interconnects. Assuming the MESI protocol (aka: very much simplified), the coprocessor can raise a section of RAM (64 bytes or so) into the "exclusive" state. As long as the coprocessor is holding exclusive, the CPU will stall as it tries to read that RAM. The co-processor can return the memory to the CPU control by setting it to "Invalid" state. The CPU can then read (or write) to memory by setting the memory to exclusive: under the CPU's control.

Communication to and from the co-processor in this case isn't "memory-mapped IO", as much as it is "I/O over memory". :-). My explanation above is simplified, but hopefully you get the gist.

A realistic example of a coherency-fabric is something like POWER9 OpenCAPI can communicate with NVidia GPUs at over 50GBps, while sharing the same memory space. (PCIe 3.0 and PCIe 4.0 has features to allow a similar effect at slightly slower speeds. I would bet that PCIe 5.0 is working on some kind of coherency fabric, but I don't actually know).

The most exotic would probably be iGPUs (Intel) and APUs (AMD), which perform this kind of cache-coherent communication but at the L3 cache level and below. Since APUs and iGPUs share the same chip, they can send these messages back and forth without ever leaving the chip. Just entirely within L3 cache itself.

Re:Tesla’s Neural Processor In The FSD Chip by traverseda on Thursday September 26, 2019 @07:19PM (#21086710)
Very interesting. I've seen a similar idea proposed to enable shared-memory based RPC, instead of communicating over a socket both processes agree to "trade" a chunk of memory back and forth, using it as a buffer for RPC messages.
Re:Tesla’s Neural Processor In The FSD Chip by dragontamer on Thursday September 26, 2019 @07:36PM (#21086817)
Its becoming clear that DDR4 RAM is "just another I/O system".

RAM has always forced CPUs to stall: refresh events are the most common (RAM is refreshing the voltage on all memory: it takes a long time and the CPU may have to wait in rare cases). But modern multicore CPUs have to have this coherency fabric to ensure that the different cores see memory in the correct order.

It doesn't really matter if the CPU is stalling because of a memory refresh, or a CPU-exclusive hold on some RAM... or even I/O pretending to be a CPU-core holding some RAM. The CPU's method of attack remains the same.

-------

This is most clear with Intel's Optane DIMMs, persistent storage that operates over the DDR4 protocol, pretending to be RAM. Slower than true DDR4 yes, but fast enough that it wanted to move off of PCIe and pretend to be DDR4 RAM. I expect more and more I/O to be "pretending to be RAM" in some effect, either through a coherency fabric or maybe even just copying the DDR4 protocol (like Optane).