Messages in this thread Patch in this message |  | | Date | Mon, 07 Apr 2008 16:40:24 +0200 | From | Johannes Weiner <> | Subject | [patch 16/22 -v3] s390: Use generic show_mem() |
| |
Remove arch-specific show_mem() in favor of the generic version.
This also removes the following redundant information display:
- pages in swapcache, printed by show_swap_cache_info() - dirty pages, writeback pages, mapped pages, slab pages, pagetable pages, printed by show_free_areas()
where show_mem() calls show_free_areas(), which calls show_swap_cache_info().
Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> ---
Index: tree-linus/arch/s390/Kconfig =================================================================== --- tree-linus.orig/arch/s390/Kconfig +++ tree-linus/arch/s390/Kconfig @@ -62,6 +62,7 @@ config S390 select HAVE_OPROFILE select HAVE_KPROBES select HAVE_KRETPROBES + select HAVE_GENERIC_SHOW_MEM source "init/Kconfig" Index: tree-linus/arch/s390/mm/init.c =================================================================== --- tree-linus.orig/arch/s390/mm/init.c +++ tree-linus/arch/s390/mm/init.c @@ -42,41 +42,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_ga pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); -void show_mem(void) -{ - int i, total = 0, reserved = 0; - int shared = 0, cached = 0; - struct page *page; - - printk("Mem-info:\n"); - show_free_areas(); - i = max_mapnr; - while (i-- > 0) { - if (!pfn_valid(i)) - continue; - page = pfn_to_page(i); - total++; - if (PageReserved(page)) - reserved++; - else if (PageSwapCache(page)) - cached++; - else if (page_count(page)) - shared += page_count(page) - 1; - } - printk("%d pages of RAM\n", total); - printk("%d reserved pages\n", reserved); - printk("%d pages shared\n", shared); - printk("%d pages swap cached\n", cached); - - printk("%lu pages dirty\n", global_page_state(NR_FILE_DIRTY)); - printk("%lu pages writeback\n", global_page_state(NR_WRITEBACK)); - printk("%lu pages mapped\n", global_page_state(NR_FILE_MAPPED)); - printk("%lu pages slab\n", - global_page_state(NR_SLAB_RECLAIMABLE) + - global_page_state(NR_SLAB_UNRECLAIMABLE)); - printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE)); -} - static void __init setup_ro_region(void) { pgd_t *pgd; --
|  |