From holt@sgi.com Wed Jan 30 10:03:18 2008 Date: Wed, 30 Jan 2008 12:03:12 -0600 From: Robin Holt To: Christoph Lameter Cc: Andrea Arcangeli , Robin Holt , Avi Kivity , Izik Eidus , Nick Piggin , kvm-devel@lists.sourceforge.net, Benjamin Herrenschmidt , Peter Zijlstra , steiner@sgi.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, daniel.blueman@quadrics.com, Hugh Dickins Subject: Re: [patch 3/6] mmu_notifier: invalidate_page callbacks for subsystems with rmap This is the second part of a patch posted to patch 1/6. --- mm/rmap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) Index: linux-2.6/mm/rmap.c =================================================================== --- linux-2.6.orig/mm/rmap.c 2008-01-30 11:09:04.000000000 -0800 +++ linux-2.6/mm/rmap.c 2008-01-30 11:12:59.000000000 -0800 @@ -476,8 +476,10 @@ int page_mkclean(struct page *page) struct address_space *mapping = page_mapping(page); if (mapping) { ret = page_mkclean_file(mapping, page); - if (unlikely(PageExternalRmap(page))) + if (unlikely(PageExternalRmap(page))) { mmu_rmap_notifier(invalidate_page, page); + ClearPageExported(page); + } if (page_test_dirty(page)) { page_clear_dirty(page); ret = 1; @@ -980,8 +982,10 @@ int try_to_unmap(struct page *page, int else ret = try_to_unmap_file(page, migration); - if (unlikely(PageExternalRmap(page))) + if (unlikely(PageExternalRmap(page))) { mmu_rmap_notifier(invalidate_page, page); + ClearPageExported(page); + } if (!page_mapped(page)) ret = SWAP_SUCCESS;