diff options
author | Mel Gorman <mgorman@suse.de> | 2014-01-21 18:49:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 19:19:44 -0500 |
commit | aec6a8889a98a0cd58357cd0937a25189908f191 (patch) | |
tree | 4c0bd0fa7a3d9e6edc0f863782e1d5807ebefb12 /arch/ia64/mm/discontig.c | |
parent | ece86e222db48d04bda218a2be70e384518bb08c (diff) |
mm, show_mem: remove SHOW_MEM_FILTER_PAGE_COUNT
Commit 4b59e6c47309 ("mm, show_mem: suppress page counts in
non-blockable contexts") introduced SHOW_MEM_FILTER_PAGE_COUNT to
suppress PFN walks on large memory machines. Commit c78e93630d15 ("mm:
do not walk all of system memory during show_mem") avoided a PFN walk in
the generic show_mem helper which removes the requirement for
SHOW_MEM_FILTER_PAGE_COUNT in that case.
This patch removes PFN walkers from the arch-specific implementations
that report on a per-node or per-zone granularity. ARM and unicore32
still do a PFN walk as they report memory usage on each bank which is a
much finer granularity where the debugging information may still be of
use. As the remaining arches doing PFN walks have relatively small
amounts of memory, this patch simply removes SHOW_MEM_FILTER_PAGE_COUNT.
[akpm@linux-foundation.org: fix parisc]
Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 |