Skip to content

Commit

Permalink
flush cache before installing new page at migraton
Browse files Browse the repository at this point in the history
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 <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
hkamezawa authored and Linus Torvalds committed Oct 16, 2007
1 parent 4106f83 commit 97ee052
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 97ee052

Please sign in to comment.