lkml.org 
[lkml]   [2005]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/
\
 
 \ /
  Last update: 2005-10-13 02:50    [W:0.014 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site