3 ms·
We have a few programming languages today that can deal with NUMA, but we still design cpus for C. As caches have gotten bigger I’ve wondered when or if we wil
by hinkley 3y ago
We have a few programming languages today that can deal with NUMA, but we still design cpus for C.
As caches have gotten bigger I’ve wondered when or if we will treat them as local memory instead of trying to maintain an illusion of cache coherency at a high cost.
- mappu 3y agoOn x86 the cache is implicit when you touch memory, and there are many ISA ops (push, call, ...) that implicitly update stack memory. But if you never call those, it is possible to access the cache explicitly. Coreboot have a custom in-tree compiler, ROMCC [1] that compiles C to a subset of x86 that never emits memory operations. They use this to treat cache as RAM [2] for a brief period during early boot before the RAM itself gets initialized. 1. https://github.com/wt/coreboot/tree/master/util/romcc https://github.com/wt/coreboot/tree/master/util/romcc The whole compiler is a single C file 2. https://www.coreboot.org/data/yhlu/cache_as_ram_lb_09142006.pdf https://www.coreboot.org/data/yhlu/cache_as_ram_lb_09142006.... Perform s/LinuxBIOS/Coreboot/ in your head as you read