diff options
author | Martin J. Bligh <mbligh@mbligh.org> | 2005-06-23 00:08:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-23 09:45:07 -0700 |
commit | 6f4e1e5061c44a93337338af4bf9bed10ee9f32e (patch) | |
tree | 61979ba584861bfb828680a8494fcd3a14a24dd8 /arch/i386/mm/pgtable.c | |
parent | bbfceef47fb9467424113a004070bf37a806a97c (diff) | |
download | talos-obmc-linux-6f4e1e5061c44a93337338af4bf9bed10ee9f32e.tar.gz talos-obmc-linux-6f4e1e5061c44a93337338af4bf9bed10ee9f32e.zip |
[PATCH] add page_state info to show_mem
This helps a lot when debugging out of memory stuff - useful especially to
see if all the memory is sucked into slab, etc.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/mm/pgtable.c')
-rw-r--r-- | arch/i386/mm/pgtable.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c index 80c84cdf22ef..270c59f099a4 100644 --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c @@ -30,6 +30,7 @@ void show_mem(void) struct page *page; pg_data_t *pgdat; unsigned long i; + struct page_state ps; printk("Mem-info:\n"); show_free_areas(); @@ -53,6 +54,13 @@ void show_mem(void) printk("%d reserved pages\n",reserved); printk("%d pages shared\n",shared); printk("%d pages swap cached\n",cached); + + get_page_state(&ps); + printk("%lu pages dirty\n", ps.nr_dirty); + printk("%lu pages writeback\n", ps.nr_writeback); + printk("%lu pages mapped\n", ps.nr_mapped); + printk("%lu pages slab\n", ps.nr_slab); + printk("%lu pages pagetables\n", ps.nr_page_table_pages); } /* |