Memory Access Patterns Are Important (2012)
mechanical-sympathy.blogspot.com
mechanical-sympathy.blogspot.com
The cache is shared across processes.
The net result is that cache latency/hit rate is highly dependent on what else is using the machine. CPU bound tasks (like, say search engine backends) tend to leave extra storage space (say for things like image serving). Streaming images out of a machine can completely thrash the cache without using many cores. When your net latency is based on the slowest percentile to come back, one badly co-scheduled process can ruin your entire cluster capacity.
On that post, jbclements commented [0] that we are reaching / have reached a point where "the conversation shifts from 'how can I meet the machine's needs?' to 'how can the machine meet my (programming) needs?'"
The idea of "the machine meeting my programming needs" still requires a programming platform that has been designed with a great deal of mechanical sympathy.
It does not have to be coherent I think. Process thrashing sounds like an issue though. I imagine if the address space is across all CPU cores then the software can pin to a core so that the access is local. Remote access to another CPU will be slow, but I'm not sure how great it is with caches anyway.
On the original PlayStation, the scratchpad was a PITA. You had to weigh the speedup against the cost of manually copying in and out the the pad. A modern implementation would copy via DMA like the PS3's Cell processors. Still a PITA, but at least the payoff for the effort can be quite good.
The other advantage of cache over explicit control of the on-chip SRAM is that it allows code to be inherently forwards and backwards compatible, rather than tying the code to a specific machine with a specific amount of on-chip memory. And I imagine the nightmare would only increase if you had to factor multitasking into an explicit scheme.
The primary benefit of explicit on-chip memory is not, AFAIK, that you can manually manage it significantly better than a cache, but that it takes up significantly less die space and has lower access latency. You really see this idea shine in tiny cheap microcontrollers that have no external memory.
[1] https://people.freebsd.org/~lstewart/articles/cpumemory.pdf
[0] http://stoneridgetechnology.com/wp-content/uploads/2014/12/C...
You end up having to read the entire thing to properly understand a part of the functionality that got its own chapter. And don't get me started on the toy examples. The happy path is the least useful example you can use. I would stumble on that by myself.
Seriously, I should have been more specific. If you take a comp. arch. class, then you get the generalization. After that, you can just read the relevant part of a manual.
Not all code written in the past ignored the hierarchy. The linux kernel itself had many tunings for this.