Search code examples
cachingarmcpu-architecturecpu-cachehmp

How is cache coherency maintained on ARMv8 big.LITTLE system?


As far as I know, big cores and little cores are in separate clusters on big.LITTLE system. And cache coherence between clusters requires the regions are marked as Outer Shareable and is very expensive. I have checked the Linux kernel code, and seems it only requires coherence in Inner Shareable domain. So my question is how can Linux guarantee cache coherence in 'CPU migration' or 'Global Task Scheduling' models where both clusters are active at the same time?

Typical big.LITTLE system


Solution

  • I have got the answer from the arm comminity. Here is the answer from dear Mark Rutland.

    https://lkml.org/lkml/2020/3/23/598

    Multiple clusters can be in the same Inner Shareable domain, and Linux relies on this being the case for systems it supports. It's possible to build a system where clusters are in distinct Inner Shareable domains, but Linux does not support using all cores on such a system.

    Even with CCI, CCN, CMN, etc, Linux requires that all cores (which it is told about) are in the same Inner Shareable domain. That is what is commonly built.