arch, mm: remove arch specific show_mem
Subsystems (2)
PATCH 129/142 arch, mm: remove arch specific show_mem
From: Michal Hocko <[email protected]>
Subject: arch, mm: remove arch specific show_mem
We have a generic implementation for quite some time already. If there is any arch specific information to be printed then we should add a callback called from the generic code rather than duplicate the whole show_mem. The current code has resulted in the code duplication and the output divergence which is both confusing and adds maintainance costs. Let's just get rid of this mess.
Signed-off-by Michal Hocko <[email protected]>
Acked-by Mel Gorman <[email protected]>
Acked-by Johannes Weiner <[email protected]>
Cc Tony Luck <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Hillf Danton <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc David Rientjes <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/ia64/mm/init.c | 48 ------------------------------------ arch/parisc/mm/init.c | 49 ------------------------------------- arch/sparc/mm/init_32.c | 11 -------- arch/tile/mm/pgtable.c | 45 --------------------------------- arch/unicore32/mm/init.c | 44 --------------------------------- 5 files changed, 197 deletions(-)
arch/ia64/mm/init.c renamed from arch/ia64/mm/init.c~arch-mm-remove-arch-specific-show_mem +0 -48
@@ -684,51 +684,3 @@ int arch_remove_memory(u64 start, u64 si }#endif #endif - -/** -* show_mem - give short summary of memory stats -* -* Shows a simple page count of reserved and used pages in the system. -* For discontig machines, it does this on a per-pgdat basis. -*/ -void show_mem (unsigned int filter) -{ -int total_reserved =0 ; -unsigned long total_present =0 ; -pg_data_t *pgdat; - -printk (KERN_INFO "Mem-info:\n" ); -show_free_areas (filter); -printk (KERN_INFO "Node memory in pages:\n" ); -for_each_online_pgdat (pgdat) { -unsigned long present; -unsigned long flags; -int reserved =0 ; -int nid = pgdat->node_id; -int zoneid; - -if (skip_free_areas_node (filter, nid)) -continue ; -pgdat_resize_lock (pgdat, &flags); - -for (zoneid =0 ; zoneid <MAX_NR_ZONES ; zoneid++) { -struct zone *zone = &pgdat->node_zones[zoneid]; -if (!populated_zone (zone)) -continue ; - - reserved += zone->present_pages - zone->managed_pages; - } - present = pgdat->node_present_pages; - -pgdat_resize_unlock (pgdat, &flags); - total_present += present; - total_reserved += reserved; -printk (KERN_INFO "Node %4d: RAM: %11ld, rsvd: %8d, " , - nid, present, reserved); - } -printk (KERN_INFO "%ld pages of RAM\n" , total_present); -printk (KERN_INFO "%d reserved pages\n" , total_reserved); -printk (KERN_INFO "Total of %ld pages in page table cache\n" , -quicklist_total_size ()); -printk (KERN_INFO "%ld free buffer pages\n" ,nr_free_buffer_pages ()); -}
arch/parisc/mm/init.c renamed from arch/parisc/mm/init.c~arch-mm-remove-arch-specific-show_mem +0 -49
55 lines not on this page · raw message
arch/sparc/mm/init_32.c renamed from arch/sparc/mm/init_32.c~arch-mm-remove-arch-specific-show_mem +0 -11
@@ -55,17 +55,6 @@ extern unsigned int sparc_ramdisk_size;unsigned long highstart_pfn, highend_pfn; -void show_mem (unsigned int filter) -{ -printk ("Mem-info:\n" ); -show_free_areas (filter); -printk ("Free swap: %6ldkB\n" , -get_nr_swap_pages () << (PAGE_SHIFT -10 )); -printk ("%ld pages of RAM\n" , totalram_pages); -printk ("%ld free pages\n" ,nr_free_pages ()); -} - -unsigned long last_valid_pfn;unsigned long calc_highpages (void )
arch/tile/mm/pgtable.c renamed from arch/tile/mm/pgtable.c~arch-mm-remove-arch-specific-show_mem +0 -45
51 lines not on this page · raw message
arch/unicore32/mm/init.c renamed from arch/unicore32/mm/init.c~arch-mm-remove-arch-specific-show_mem +0 -43
46 lines not on this page · raw message