Messages in this thread Patch in this message | | | Date | Thu, 13 Oct 2005 01:46:17 +0100 (BST) | From | Hugh Dickins <> | Subject | [PATCH 02/21] mm: zap_pte_range dec rss |
| |
Small adjustment: zap_pte_range decrement its rss counts from 0 then finally add, avoiding negations - we don't have or need a sub_mm_rss.
Signed-off-by: Hugh Dickins <hugh@veritas.com> ---
mm/memory.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
--- mm01/mm/memory.c 2005-10-11 23:53:00.000000000 +0100 +++ mm02/mm/memory.c 2005-10-11 23:53:17.000000000 +0100 @@ -609,13 +609,13 @@ static void zap_pte_range(struct mmu_gat set_pte_at(mm, addr, pte, pgoff_to_pte(page->index)); if (PageAnon(page)) - anon_rss++; + anon_rss--; else { if (pte_dirty(ptent)) set_page_dirty(page); if (pte_young(ptent)) mark_page_accessed(page); - file_rss++; + file_rss--; } page_remove_rmap(page); tlb_remove_page(tlb, page); @@ -632,7 +632,7 @@ static void zap_pte_range(struct mmu_gat pte_clear_full(mm, addr, pte, tlb->fullmm); } while (pte++, addr += PAGE_SIZE, addr != end); - add_mm_rss(mm, -file_rss, -anon_rss); + add_mm_rss(mm, file_rss, anon_rss); pte_unmap(pte - 1); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |