[PATCH] zap anonymous unremarkable

From: Hugh Dickins
Date: Tue Jun 22 2004 - 14:13:10 EST


zap_pte_range is wasting time marking anon pages accessed: its original
!PageSwapCache test should have been reinstated when page_mapping was
changed to return swapper_space; or more simply, just check !PageAnon.

Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>

--- 2.6.7/mm/memory.c 2004-06-16 06:20:40.000000000 +0100
+++ linux/mm/memory.c 2004-06-22 13:17:24.445430864 +0100
@@ -407,7 +407,7 @@ static void zap_pte_range(struct mmu_gat
set_pte(ptep, pgoff_to_pte(page->index));
if (pte_dirty(pte))
set_page_dirty(page);
- if (pte_young(pte) && page_mapping(page))
+ if (pte_young(pte) && !PageAnon(page))
mark_page_accessed(page);
tlb->freed++;
page_remove_rmap(page);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/