Commit 1d5e0f06 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] zap_pte_range speedup

From: Hugh Dickins <hugh@veritas.com>

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: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4a37dd4c
...@@ -407,7 +407,7 @@ static void zap_pte_range(struct mmu_gather *tlb, ...@@ -407,7 +407,7 @@ static void zap_pte_range(struct mmu_gather *tlb,
set_pte(ptep, pgoff_to_pte(page->index)); set_pte(ptep, pgoff_to_pte(page->index));
if (pte_dirty(pte)) if (pte_dirty(pte))
set_page_dirty(page); set_page_dirty(page);
if (pte_young(pte) && page_mapping(page)) if (pte_young(pte) && !PageAnon(page))
mark_page_accessed(page); mark_page_accessed(page);
tlb->freed++; tlb->freed++;
page_remove_rmap(page); page_remove_rmap(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment