summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-10-29 18:16:14 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-29 21:40:39 -0700
commit86d912f41dca32eca8827f2f878139735e69dc28 (patch)
tree9f29b853e7690f0fa10c4257a2b8649673908e2d
parent8c10376271e097fa13cda956e1b2f3cb7e4d4dd9 (diff)
downloadblackbird-op-linux-86d912f41dca32eca8827f2f878139735e69dc28.tar.gz
blackbird-op-linux-86d912f41dca32eca8827f2f878139735e69dc28.zip
[PATCH] 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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--mm/memory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 7893eb4bb8c0..bc6296398f8b 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -609,13 +609,13 @@ static void zap_pte_range(struct mmu_gather *tlb,
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_gather *tlb,
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);
}
OpenPOWER on IntegriCloud