mm: introduce helper function mem_init_print_info() to simplify mem_init()
authorJiang Liu <liuj97@gmail.com>
Wed, 3 Jul 2013 22:03:41 +0000 (15:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:35 +0000 (16:07 -0700)
commit7ee3d4e8cd560500192d80ca84d7f15d6dee0807
tree8c58a121edb9c528fb6497e04774dca8d121aa4f
parenta214a8c68bcdef2fb0803425f7fe36fe41030d3f
mm: introduce helper function mem_init_print_info() to simplify mem_init()

Introduce helper function mem_init_print_info() to simplify mem_init()
across different architectures, which also unifies the format and
information printed.

Function mem_init_print_info() calculates memory statistics information
without walking each page, so it should be a little faster on some
architectures.

Also introduce another helper get_num_physpages() to kill the global
variable num_physpages.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michel Lespinasse <walken@google.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/mm.h
mm/page_alloc.c