diff options
Diffstat (limited to 'arch/ia64/mm/discontig.c')
-rw-r--r-- | arch/ia64/mm/discontig.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 2de08f4d9930..878626805369 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -608,69 +608,6 @@ void *per_cpu_init(void) | |||
608 | #endif /* CONFIG_SMP */ | 608 | #endif /* CONFIG_SMP */ |
609 | 609 | ||
610 | /** | 610 | /** |
611 | * show_mem - give short summary of memory stats | ||
612 | * | ||
613 | * Shows a simple page count of reserved and used pages in the system. | ||
614 | * For discontig machines, it does this on a per-pgdat basis. | ||
615 | */ | ||
616 | void show_mem(unsigned int filter) | ||
617 | { | ||
618 | int i, total_reserved = 0; | ||
619 | int total_shared = 0, total_cached = 0; | ||
620 | unsigned long total_present = 0; | ||
621 | pg_data_t *pgdat; | ||
622 | |||
623 | printk(KERN_INFO "Mem-info:\n"); | ||
624 | show_free_areas(filter); | ||
625 | if (filter & SHOW_MEM_FILTER_PAGE_COUNT) | ||
626 | return; | ||
627 | printk(KERN_INFO "Node memory in pages:\n"); | ||
628 | for_each_online_pgdat(pgdat) { | ||
629 | unsigned long present; | ||
630 | unsigned long flags; | ||
631 | int shared = 0, cached = 0, reserved = 0; | ||
632 | int nid = pgdat->node_id; | ||
633 | |||
634 | if (skip_free_areas_node(filter, nid)) | ||
635 | continue; | ||
636 | pgdat_resize_lock(pgdat, &flags); | ||
637 | present = pgdat->node_present_pages; | ||
638 | for(i = 0; i < pgdat->node_spanned_pages; i++) { | ||
639 | struct page *page; | ||
640 | if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) | ||
641 | touch_nmi_watchdog(); | ||
642 | if (pfn_valid(pgdat->node_start_pfn + i)) | ||
643 | page = pfn_to_page(pgdat->node_start_pfn + i); | ||
644 | else { | ||
645 | i = vmemmap_find_next_valid_pfn(nid, i) - 1; | ||
646 | continue; | ||
647 | } | ||
648 | if (PageReserved(page)) | ||
649 | reserved++; | ||
650 | else if (PageSwapCache(page)) | ||
651 | cached++; | ||
652 | else if (page_count(page)) | ||
653 | shared += page_count(page)-1; | ||
654 | } | ||
655 | pgdat_resize_unlock(pgdat, &flags); | ||
656 | total_present += present; | ||
657 | total_reserved += reserved; | ||
658 | total_cached += cached; | ||
659 | total_shared += shared; | ||
660 | printk(KERN_INFO "Node %4d: RAM: %11ld, rsvd: %8d, " | ||
661 | "shrd: %10d, swpd: %10d\n", nid, | ||
662 | present, reserved, shared, cached); | ||
663 | } | ||
664 | printk(KERN_INFO "%ld pages of RAM\n", total_present); | ||
665 | printk(KERN_INFO "%d reserved pages\n", total_reserved); | ||
666 | printk(KERN_INFO "%d pages shared\n", total_shared); | ||
667 | printk(KERN_INFO "%d pages swap cached\n", total_cached); | ||
668 | printk(KERN_INFO "Total of %ld pages in page table cache\n", | ||
669 | quicklist_total_size()); | ||
670 | printk(KERN_INFO "%ld free buffer pages\n", nr_free_buffer_pages()); | ||
671 | } | ||
672 | |||
673 | /** | ||
674 | * call_pernode_memory - use SRAT to call callback functions with node info | 611 | * call_pernode_memory - use SRAT to call callback functions with node info |
675 | * @start: physical start of range | 612 | * @start: physical start of range |
676 | * @len: length of range | 613 | * @len: length of range |