flush cache before installing new page at migraton
authorKAMEZAWA Hiroyuki <[email protected]>
Tue, 16 Oct 2007 08:25:43 +0000 (01:25 -0700)
committerLinus Torvalds <[email protected]>
Tue, 16 Oct 2007 16:42:59 +0000 (09:42 -0700)
In migration, a new page should be cache flushed before set_pte() in some
archs which have virtually-tagged cache.

Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Nick Piggin <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/migrate.c

index 71c38b43c019f4c0250c8f82dde94e21501c1ab4..ea11ddb58275ec292783418c05c12852e903e4a0 100644 (file)
@@ -171,6 +171,7 @@ static void remove_migration_pte(struct vm_area_struct *vma,
        pte = pte_mkold(mk_pte(new, vma->vm_page_prot));
        if (is_write_migration_entry(entry))
                pte = pte_mkwrite(pte);
+       flush_cache_page(vma, addr, pte_pfn(pte));
        set_pte_at(mm, addr, ptep, pte);
 
        if (PageAnon(new))