4 ms·
When would a programmer explicitly need to invalidate the CPU cache? Does this not happen automatically on a context switch?
by randyrand 10y ago
When would a programmer explicitly need to invalidate the CPU cache? Does this not happen automatically on a context switch?
- JoeAltmaier 10y agoOne example is when doing a dma operation to memory. That often bypasses the cache. If the new data is to 'stick' the cache needs to be convinced it doesn't know what's in that buffer any more. This is an ARM thing; Intel architectures integrate DMA with the cache.