diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 22:05:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 22:05:45 -0500 |
commit | df32e43a54d04eda35d2859beaf90e3864d53288 (patch) | |
tree | 7a61cf658b2949bd426285eb9902be7758ced1ba /arch/ia64/mm/init.c | |
parent | fbd918a2026d0464ce9c23f57b7de4bcfccdc2e6 (diff) | |
parent | 78d5506e82b21a1a1de68c24182db2c2fe521422 (diff) |
Merge branch 'akpm' (incoming from Andrew)
Merge first patch-bomb from Andrew Morton:
- a couple of misc things
- inotify/fsnotify work from Jan
- ocfs2 updates (partial)
- about half of MM
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (117 commits)
mm/migrate: remove unused function, fail_migrate_page()
mm/migrate: remove putback_lru_pages, fix comment on putback_movable_pages
mm/migrate: correct failure handling if !hugepage_migration_support()
mm/migrate: add comment about permanent failure path
mm, page_alloc: warn for non-blockable __GFP_NOFAIL allocation failure
mm: compaction: reset scanner positions immediately when they meet
mm: compaction: do not mark unmovable pageblocks as skipped in async compaction
mm: compaction: detect when scanners meet in isolate_freepages
mm: compaction: reset cached scanner pfn's before reading them
mm: compaction: encapsulate defer reset logic
mm: compaction: trace compaction begin and end
memcg, oom: lock mem_cgroup_print_oom_info
sched: add tracepoints related to NUMA task migration
mm: numa: do not automatically migrate KSM pages
mm: numa: trace tasks that fail migration due to rate limiting
mm: numa: limit scope of lock for NUMA migrate rate limiting
mm: numa: make NUMA-migrate related functions static
lib/show_mem.c: show num_poisoned_pages when oom
mm/hwpoison: add '#' to hwpoison_inject
mm/memblock: use WARN_ONCE when MAX_NUMNODES passed as input parameter
...
Diffstat (limited to 'arch/ia64/mm/init.c')
-rw-r--r-- | arch/ia64/mm/init.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 88504abf5704..25c350264a41 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -684,3 +684,51 @@ per_linux32_init(void) | |||
684 | } | 684 | } |
685 | 685 | ||
686 | __initcall(per_linux32_init); | 686 | __initcall(per_linux32_init); |
687 | |||
688 | /** | ||
689 | * show_mem - give short summary of memory stats | ||
690 | * | ||
691 | * Shows a simple page count of reserved and used pages in the system. | ||
692 | * For discontig machines, it does this on a per-pgdat basis. | ||
693 | */ | ||
694 | void show_mem(unsigned int filter) | ||
695 | { | ||
696 | int total_reserved = 0; | ||
697 | unsigned long total_present = 0; | ||
698 | pg_data_t *pgdat; | ||
699 | |||
700 | printk(KERN_INFO "Mem-info:\n"); | ||
701 | show_free_areas(filter); | ||
702 | printk(KERN_INFO "Node memory in pages:\n"); | ||
703 | for_each_online_pgdat(pgdat) { | ||
704 | unsigned long present; | ||
705 | unsigned long flags; | ||
706 | int reserved = 0; | ||
707 | int nid = pgdat->node_id; | ||
708 | int zoneid; | ||
709 | |||
710 | if (skip_free_areas_node(filter, nid)) | ||
711 | continue; | ||
712 | pgdat_resize_lock(pgdat, &flags); | ||
713 | |||
714 | for (zoneid = 0; zoneid < MAX_NR_ZONES; zoneid++) { | ||
715 | struct zone *zone = &pgdat->node_zones[zoneid]; | ||
716 | if (!populated_zone(zone)) | ||
717 | continue; | ||
718 | |||
719 | reserved += zone->present_pages - zone->managed_pages; | ||
720 | } | ||
721 | present = pgdat->node_present_pages; | ||
722 | |||
723 | pgdat_resize_unlock(pgdat, &flags); | ||
724 | total_present += present; | ||
725 | total_reserved += reserved; | ||
726 | printk(KERN_INFO "Node %4d: RAM: %11ld, rsvd: %8d, ", | ||
727 | nid, present, reserved); | ||
728 | } | ||
729 | printk(KERN_INFO "%ld pages of RAM\n", total_present); | ||
730 | printk(KERN_INFO "%d reserved pages\n", total_reserved); | ||
731 | printk(KERN_INFO "Total of %ld pages in page table cache\n", | ||
732 | quicklist_total_size()); | ||
733 | printk(KERN_INFO "%ld free buffer pages\n", nr_free_buffer_pages()); | ||
734 | } | ||