On Fri, Apr 11, 2014 at 11:58 AM, David Miller davem@davemloft.net wrote:
Since we do most of the cache flushing stuff during normal operations at the PTE modification point, perhaps a piece of page state could be used to handle this. We already use such a thing for D-cache alias flushing.
So looking at the powerpc code, I thought ppc already did this, but it seems to do something different: it lazily does the icache flush at page fault time if the page has been marked by dcache flush (with the PG_arch_1 bit indicating whether the page is coherent in the I$).
But I don't see it trying to actually flush the icache of already mapped processes when modifying the dcache.
So while we *could* do that, apparently no architecture does this. Even the one architecture that I thought did it doesn'r really try to make things globally coherent.
(My "analysis" was mainly using "git grep", so maybe I missed something).
Linus