3 ms·
Aren't most modern CPU's cache coherent? I know the recent PowerPC SoC I was working with was. All of the DMA cache sync functions were no-ops in the Linux kern
by Unklejoe 9y ago
Aren't most modern CPU's cache coherent? I know the recent PowerPC SoC I was working with was. All of the DMA cache sync functions were no-ops in the Linux kernel for that architecture.
- noselasd 9y agoFor many architectures the coherency is turned off and managed in software by the device driver, to achieve better performance.
- Unklejoe 9y agoAny examples of this in the Linux kernel? Not doubting you, I'm just curious. I would think this would be device driver specific rather than architecture specific. Most drivers I've seen just use the kernel's DMA API (dma_alloc_coherent), which is guaranteed to provide a buffer that doesn't require any explicit cache management. If the architecture is coherent, then it leaves caching turned on for those pages. If it's non-coherent, then it turns it off.
- david-gpu 9y agoOn mobile SoCs the GPU is commonly not cache coherent with the CPU. Same with many of the other cores in the SoC.