From df849a1529c106f7460e51479ca78fe07b07dc8c Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Fri, 30 Jun 2006 01:55:38 -0700 Subject: [PATCH] zoned vm counters: conversion of nr_pagetables to per zone counter Conversion of nr_page_table_pages to a per zone counter [akpm@osdl.org: bugfix] Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/memory.c | 4 ++-- mm/page_alloc.c | 2 +- mm/vmstat.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mm') diff --git a/mm/memory.c b/mm/memory.c index 247b5c312b9..1a78791590f 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -126,7 +126,7 @@ static void free_pte_range(struct mmu_gather *tlb, pmd_t *pmd) pmd_clear(pmd); pte_lock_deinit(page); pte_free_tlb(tlb, page); - dec_page_state(nr_page_table_pages); + dec_zone_page_state(page, NR_PAGETABLE); tlb->mm->nr_ptes--; } @@ -311,7 +311,7 @@ int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address) pte_free(new); } else { mm->nr_ptes++; - inc_page_state(nr_page_table_pages); + inc_zone_page_state(new, NR_PAGETABLE); pmd_populate(mm, pmd, new); } spin_unlock(&mm->page_table_lock); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a38a11cfb48..ed3f2a7b407 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1320,7 +1320,7 @@ void show_free_areas(void) nr_free_pages(), global_page_state(NR_SLAB), global_page_state(NR_FILE_MAPPED), - ps.nr_page_table_pages); + global_page_state(NR_PAGETABLE)); for_each_zone(zone) { int i; diff --git a/mm/vmstat.c b/mm/vmstat.c index dc9e6920922..292a35fe56c 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -399,12 +399,12 @@ static char *vmstat_text[] = { "nr_mapped", "nr_file_pages", "nr_slab", + "nr_page_table_pages", /* Page state */ "nr_dirty", "nr_writeback", "nr_unstable", - "nr_page_table_pages", "pgpgin", "pgpgout", -- cgit v1.2.3