Side-question: is there a way to write code to be sure my code and data is stored in L3 cache? I understand it's done automatically from RAM, but what if I want to hack it out so that it's guaranteed to be in cache? What about L2 cache?
The introduction talk to this is by Mike Acton at cppcon, but Jon Blow has been harping on about it as well
E.g. I want to run Quake1 right from the L3 cache.
E.g. with filesystem I'm sure when I read or write it, if I use regular IO operations, no mmap-ing (of course there's a lot of quirks with drive caches not respecting fsync, etc, but let's skip that for sake of this comment).
It's a common feature on embedded processors, where portability is less of a concern.